Exercise M3.02: scaling

Looking at the solution I see

The results of the search and the prose below appear to disagree? (I would have expected with_std to be True if scaling yields better results?

The parallel plot also agrees with the prose paragraph (the best models seem to be scaled).

What gives?

Thanks!

(doing the search on my own also resulted in a model whose best-performing value for with_std was False)

You are right. The statement that the best model is obtained when the features are scaled but not centered is not always true, as it can be confirmed by the parallel plot: scaling is important but centering is not. We will fix this interpretation.

I agree and I don’t understand why best_params is returning False in flagrant conflict with the parallel plot. Any ideas on this @ogrisel ?

1 Like

Most probably, we don’t have enough iteration. I am also wondering that since the loss of the logistic regression is convex and that we have a really large number of iterations (10,000), a model with a given C will lead to the same statistical performance with both scaling and not scaling.

For me, I get the following parameters (with train_size = 80%) :
{ ‘columntransformer__standard_scaler__with_mean’: True,
columntransformer__standard_scaler__with_std’: True,
‘logisticregression__C’: 2.1802318892988515}