C2w1 regularization and overfitting in practice

Hi

I am really enjoying this class. It is very helpful!

I work with high-dimensional data. I am looking for a good rule of thumb for deciding if my model is overfit or not.

In the regularization assignment, the way we are able to determine the model is over fit is by looking at a plot. The plot is only possible because the data is 2d

Typically, I look at some sort of test metric like accuracy. In this assignment

accuracy train, test

no reg : 0.95, 0.92

I would have assumed the model did not over fit. the accuracy for both is good. I expect the accuracy of the test to be a little lower

l2 reg: 0.93, 0.93

without a plot I would assume the model did not do better how ever I would probably choose this model because I would assume it is more parsimonious

drop out reg: 0.92, 0.95

without a plot I would assume there is some sort of problem because the test data set out performance the training set

Any suggestions would be greatly appreciated

This can be tricky, given that you can’t rely on a plot for multi-feature data sets.

So you have to try a method like - are the predictions given by the test set “good enough” to meet your project’s overall needs?

For example, if you have low training error but high test set error, then you may have an overfit issue.

This is a learned skill, which means you get better at it as you gain experience.

2 Likes

You have to test the model on a number of test set partitions with each testing iteration, also when you create the test set it should cover big enough portion of all available examples and those should never be seen from training phase under any circumstances.

2 Likes