Model Validation Flashcards

1
Q

What is the prediction error formula?

A

error = actual - predicted

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

What does MAE stand for and what is it used for?

A

1) Mean Absolute Error
2) It is a summary metric of prediction errors
3) It is a measurement of a model’s quality, based on accuracy
4) Said another way: On Average, our predictions are off by X.

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

MAE formula?

A

total # of observations

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

What is Validation Data?

A

Excluding some data from the model-building process, and then using this excluded data to test the model’s accuracy on data it hasn’t seen before

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

What is scikit-learn’s library function to break up data into two pieces?

A

train_test_split

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

What is scikit-learn’s library function to calculate the MAE

A

mean_absolute_error

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

What is scikit-learn’s library function to define a Decision Tree Model?

A

DecisionTreeRegressor

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

What is the syntax to import the scikit-learn library function that breaks up data into two pieces?

A

from sklearn.model_selection import train_test_split

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

What is random_state used for?

A

random_state ensures that splits that you generate are reproducible and deterministic.

It is a seed to the random number generator that ensures the random numbers are generated in the same order.

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

What function is used to train a model?

A

fit function

example:
my_model.fit(features, target)

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

What is Pandas tolist() function used for?

A

It is used to convert a Series into a List

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

What is the syntax to import the scikit-learn library function that calculates the MAE?

A

from sklearn.metrics import mean_absolute_error

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