rasbt / machine-learning-book

Code Repository for Machine Learning with PyTorch and Scikit-Learn
https://sebastianraschka.com/books/#machine-learning-with-pytorch-and-scikit-learn
MIT License
3.63k stars 1.31k forks source link

Chapter4 Page 126 #171

Open diegoruggi opened 7 months ago

diegoruggi commented 7 months ago

Hi Sebastian,

The second code block on page 126 states: "Note that C=1.0 is the default. You can increase or decrease it to make the regularization effect stronger or weaker, respectively." which implies a proportional relationship between C and lambda, instead of an inverse relationship as stated on page 128. Additionally, on page 127, it's stated : "...However,...by further increasing the regularization strength--that is, choosing lower values for the C parameter."

I want to make sure I'm understanding this correctly in the event that it is an error and not listed in the errata section.

rasbt commented 7 months ago

Thanks for the feedback. You are right, increasing the value of C makes the regularization effect weaker because in sklearn C is the inverse of regularization strength. I'll make a note to be more clear about that in future reprints. Thanks!

diegoruggi commented 6 months ago

No problem; loving the book!