Questions of C2W3_Lab_01_Model_Evaluation_and_Selection" with sklearn

  1. In the lab when we are using sklearn, why we are not using regularization in the MSE function?

  1. Why we need to get the training MSE? isn’t this error is not good for evaluate the model?

Why after used PolynomialFeatures(degree=2, include_bias=False), the x feature is only 2 per training set? should it be [a, b, a^2, ab, b^2] by default?

Why in this lab it keeps showing the training error? Since it’s not helpful with activation function selection

We don’t include any regularization cost when evaluating the model after it is trained. We only include regularization during training. This is how it helps mitigate overfitting.

Once you have a model and you want to evaluate its fit to the data, you don’t want any artificial penalties based on the magnitude of the weights.

Later I’ll look into your question about polynomial features.

Comparing the the training set and validation set costs is handy for diagnosing bias and variance.

1 Like