Module 2 Flashcards

1
Q

In __________, labeled training data refers to a dataset that includes both the input data and the corresponding correct output.

A

Supervised Learning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

This refers to data with both input data and a corresponding correct output.

A

Labeled Training Data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

______ is used to train a machine learning model to make predictions or decisions without being explicitly programmed.

A

Labeled Data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The primary objective of ________ is to make a function or mapping the input variable with the output variable.

A

Supervised Learning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two categories under Supervised Learning?

A

Regression (Prediction) and Classification (Description)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

This category of Supervised Learning refers to algorithms that address classification problems where the output variable is categorical.

A

Classification

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

This category of Supervised Learning predicts one of the possible class labels.

A

Classification

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are some types of Classification?

A
  • Binary Classification - classification of two classes.
  • Multiple Classification - classification of three or more classes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the examples of Classification algorithms.

A
  • Random Forest Algorithm
  • Decision Tree Algorithm
  • Logistic Regression Algorithm
  • Support Vector Machine Algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

This category of Supervised Learning handle regression problems where input and output variables have a linear relationship.

A

Regression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This category of Supervised Learning predicts consecutive numbers (real numbers).

A

Regression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some examples of Regression algorithms?

A
  • Simple Linear Regression Algorithm
  • Multivariate Regression Algorithm
  • Decision Tree Algorithm
  • Lasso Regression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

True or False.
The supervised ML has three phases: the usual training and validation, data prediction, and deployment.

A

False
(TWO phases only. The usual training and validation, followed by prediction.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False.
Model complexity is loosely tied to the variation of inputs contained within the training dataset.

A

False.
(it is INTIMATELY tied to the variation of inputs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False.
Regarding model complexity, the larger the variety of data points the data set contains, the more complex a model can be used without overfitting.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

True or False.
Collecting more data points will yield more variety, so that larger datasets allow for building more complex models.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True of False.
Duplicating similar data points or collecting very similar data is usually helpful.

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

True or False.
In supervised learning, it is important to build a model on the training data and then be able to make accurate predictions on previously observed data.

A

False.
(make accurate predictions on NEW, UNSEEN data that has the SAME CHARACTERISTICS as the training set that we used.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

If a model is able to make accurate predictions on unseen data, we say it is able to _________ from the training set to the test set.

A

Generalize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

This occurs when a model learns the training data too well, including its noise and outliers.

A

Overfitting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

_______ occurs when you fit a model too closely to the particularities of the training set and obtain a model that works well on the training set but is not able to generalize to new data.

A

Overfitting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

True or False.
An overfitted model performs exceptionally well on training data but poorly on new, unseen data.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Choosing a model that is too simple is called “______”.

A

Underfitting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

This occurs when your model is too simple then you might not be able to capture all the aspects of and variability in the data, and your model will do badly even on the training set.

A

Underfitting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

True or False.
An underfitted model performs poorly on the training data but excels in new, unseen data.

A

False.
(underfitted models perform poorly on both training and new data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

True or False.
The more complex the model, the better we can use it to predict data.

A

True.

27
Q

True or False.
The most complex models are almost always the most optimal choice for predictions.

A

False.
(too complex models focuses too much on each individual point in the training set)

28
Q

These are errors from having wrong / too simple assumptions in the learning algorithm.

A

Bias

29
Q

These are errors resulting from sensitivity to the noise / fluctuations in the training data.

A

Variance

30
Q

This is arguably the simplest machine learning algorithm.

A

k-NN (k-Nearest Neighbor) Algorithm

31
Q

Building this model consists only of storing the training dataset.

A

k-NN (k-Nearest Neighbor) Algorithm

32
Q

To make a prediction for a new data point, the
algorithm finds the closest data points in the training dataset.

A

k-NN (k-Nearest Neighbor) Algorithm

33
Q

True or False.
In its simplest version, the k-NN algorithm only considers exactly two nearest neighbors, which is the closest training data point to the point we want to make a prediction for.

A

False.
(exactly ONE nearest neighbor)

34
Q

In k-NN Algorithm, _______ is used to assign a label when considering more than one neighbor.

A

Voting

35
Q

What is the code for importing the k-NN Classifier?

A

from sklearn.neighbor import KNeighborsClassifier

36
Q

What is the code for creating an instance of the k-NN Classifier?

A

variable_name = KNeighborsClassifier(n_neighbors = x)

37
Q

In k-NN Classifier, as the number of k-neighbors increase, the model becomes _______.complex.

A

Less complex

38
Q

In the regression variant of k-NN, the prediction of the model is the ____ or ______ of the relevant neighbors when using multiple neighbors

A

Average; Mean

39
Q

The Squared Score (R^2) is also known as the?

A

Coefficient of Determination

40
Q

This is a measure of goodness of a prediction for a regression model.

A

Squared Score

41
Q

What are the two important parameters to eh KNeighbors Classifier?

A
  • Number of neighbors
  • How you measure the distance between data points (Euclidean distance is used by default)
42
Q

What are the strengths of the KNeighbors Classifier?

A
  • Easy to Understand
  • Works well without any special adjustments
  • Suitable as first-time models
43
Q

What are the weaknesses of the KNeighbors Classifier?

A
  • If the number of features or samples is large, the prediction is slow and data preprocessing is important
  • does not work well with sparse data sets.
44
Q

These models generate a formula to create a best-fit line to predict unknown values.

A

Linear Models

45
Q

These models make a prediction using a linear function of the input features.

A

Linear Models

46
Q

True or False.
Linear models are called linear because they assume that there is a linear relationship between the outcome variable and each of its predictors.

A

True

47
Q

This is the algorithm for solving regression problems in linear models.

A

Linear Regression

48
Q

What are the final output of linear regression models?

A

Numeric values (Numeric predictions)

49
Q

This linear model is used for classification problems.

A

Logistic Regression

50
Q

Linear regression is also known as “_________”

A

Ordinary Least Squares (OLS)

51
Q

This is the simplest and most classic linear method for regression.

A

Linear Regression

52
Q

This model finds the parameters w and b that minimize the mean squared error between predictions and the true regression targets, y, on the training set.

A

Linear Regression

53
Q

This is the sum of the squared differences between the predictions and true values.

A

Mean Squared Error (MSE)

54
Q

It is one of the most commonly used alternatives to standard linear regression.

A

Ridge Regression

55
Q

In this model, the coefficients (w) are chosen not only so that they can predict well on the training data, but also to fit an additional constraint.

A

Ridge Regression

56
Q

In this model, the magnitude of coefficients to be as small as possible; in other words, all entries of w should be close to zero (approaches zero, but not zero).

A

Ridge Regression

57
Q

Each feature should have as little effect on the outcome as possible (which translates to having a small slope), while still predicting well. This constraint is an example of what is called _________.

A

Regularization

58
Q

________ means explicitly restricting a model to avoid overfitting.

A

Regularization

59
Q

The particular kind of regularization used by ridge regression is known as “________”.

A

L2 Regularization

60
Q

True or False.
In ridge regression, if α is smaller, the penalty becomes smaller and w should be smaller.

A

False.
(If α is BIGGER, the penalty becomes BIGGER and w should be SMALLER)

61
Q

It is an alternative to Ridge for regularizing linear regression.

A

Lasso Regression

62
Q

The particular kind of regularization used by lasso regression is known as “_______”.

A

L1 Regularization

63
Q

True or False.
In L1 Regularization, coefficients can reach zero which means that certain features are entirely ignored by the model.

A

True

64
Q

True or False.
Lasso is generally preferred over Ridge because L1 penalty is preferred over L2 penalty.

A

False.
(Ridge is preferred over Lasso, L2 penalty is preferred over L1 penalty.)