Question about hyperparameter value C

Hello everyone, for exercise M4.05, after plotting the weights of the logistic regression, we realize that a small C gives a more regularized model. (Seen in the image just below:)
the effects of the hyperparams

Meanwhile, according to the diagram just below, that value of C(0.01) doesn’t seem to be doing a good classification. I am confused about this.

log reg when C is 0.01

Add more regularization does not mean that it will give a better classification. Otherwise, we would not have a problem, we would always add a large regularization :slight_smile:

Regularization will shrink the weights towards zero. Here the Culmen Depth is a smaller weight than Culmen Length. Adding regularization bring the two weights toward zero and for C=0.01, the weight of Culmen Depth is really small and thus only Culmen Length become important. It explains the vertical decision boundary.

We will always tune the C parameter to find the right amount of regularization in practice.

1 Like