Regularization parameter selection

When applying regularized logistic regression: I divided my data into training, cross-validation and test sets. I want to apply regularization and am working on choosing a lambda regularization parameter. To do this, I try different lambda values ​​and fit the theta parameter of my hypothesis on the training set. Then I select the lambda value that gives me the lowest cost function in the validation set. To do this, I have to calculate the cost function of the validation set with or without punishment?

+4
source share
2 answers

This mixes two things. You minimize the cost function (with the regularization condition) to select model parameters (for given hyperparameters, such as lambda). But then the parameters allow you to classify the points in the test set. And you measure how correctly the classification is true. You choose the lambda that gives the most correct answers. The cost function with lambda does not play any role at this stage.

+8
source

You can draw a learning curve, both a learning error and a validation that converges to a small value, and selected the parameter corresponding to the smallest error as the regularization parameter.

The regularization parameter parameter has nothing to do with the value of the cost function.

+3
source

All Articles