Assessing predictive error
Test error, train error¶
A dataset was gathered and split into two groups of samples: with points and with points. A regression function estimate was fit using . Another regression function estimate was also fit using . The following quantities were computed:
Given this information, which estimate would generally be preferred, or ?
Solutions
, which has the lower error on the testing data.
Test error, train error, II¶
A dataset was gathered and then split into a train set with points and a test set with points. A regression function estimate was trained using the training dataset. Then two forms of error were computed, as follows.
True or false: in typical cases, we expect to be greater than .
Solutions
False. is the train error. It’s usually better (i.e. lower) than .
Estimator bias¶
Imagine you are given an estimator and a dataset. Using test/train splits and/or the bootstrap, we can usually get an accurate assessment of the estimator’s bias on this dataset. True or false?
Solutions
Unfortunately, no. Getting estimator bias is quite hard.
Mean squared error¶
Consider a prediction problem with one categorical predictor and one continuous response . You obtain an estimate for the regression function . True or false:
Solutions
Mean squared error and heteroskedasticity¶
Consider a prediction problem with one continuous response . You obtain an estimate for the regression function . Let denote two possible values for the input. True or false: if there is no heteroskedasticity in the true relationship between and , then we know that
Solutions
In general, false! However, if was a perfect estimate of the regression function, then then this statement would be true. Let denote the true regression function. Recall that
and homoscedasticity (i.e., lack of heteroskedasticity) implies that for every . However, in general, , so one may have that .
This may seem like a bit of a trick question, but it is a trick that actually tricks real people in the real world. Here’s the key thing to remember: even if the true relationship is basically homoskedastic, your estimator may just be more wrong for some inputs. That means it will have worse error for some inputs than others.
Quality of an estimate for the conditional distribution¶
Let denote an estimate of the conditional distribution of a binary response given an input . Which of the following are traditional tools for measuring the quality of this estimate?
Log likelihood
Misclassification rate (of the hard classifier )
Squared error
Mean absolute error
AUROC
Solutions
Misclassification rate, log likelihood, and AUROC are all traditional. Squared error and mean absolute error are more traditional on a regression context.
Low train error, high test error¶
If you observe low training error and high validation error for your model, you might want to adjust your estimator in ways that increase its bias. True or false?
Solutions
True. You don’t really want to increase the bias, but you may choose a different estimator that has less variance (and more bias).