Model Validation Flashcards
What is the prediction error formula?
error = actual - predicted
What does MAE stand for and what is it used for?
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.
MAE formula?
total # of observations
What is Validation Data?
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
What is scikit-learn’s library function to break up data into two pieces?
train_test_split
What is scikit-learn’s library function to calculate the MAE
mean_absolute_error
What is scikit-learn’s library function to define a Decision Tree Model?
DecisionTreeRegressor
What is the syntax to import the scikit-learn library function that breaks up data into two pieces?
from sklearn.model_selection import train_test_split
What is random_state used for?
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.
What function is used to train a model?
fit function
example:
my_model.fit(features, target)
What is Pandas tolist() function used for?
It is used to convert a Series into a List
What is the syntax to import the scikit-learn library function that calculates the MAE?
from sklearn.metrics import mean_absolute_error