I've recently started using Kaggle, and I've noticed that for a lot of these jupyter notebooks written by others, when they use Ridge/Lasso, they don't standardize the non-categorical numerical features. My understanding is it's best practice to standardize when regularizing, so there's some form of parity when it comes to penalizing the different coefficients.

Why is there (seemingly) a lack of this standardization practice on Kaggle? Am I missing something here?

Here are a couple examples: https://www.kaggle.com/mohaiminul101/car-price-prediction


Honestly. I feel like the majority that I've seen that use Lasso/Ridge do not do any standardization, and I usually only look at the highest voted ones for pretty popular datasets, so I'm a little surprised.

  • 1
    $\begingroup$ Could you please share a specific Notebook $\endgroup$
    – 10xAI
    May 4 '21 at 16:23
  • $\begingroup$ @10xAI I just included one. I'll update the OP with I find more, but I didn't make a list when I was going through codes before. But honestly, I'm pretty sure at least 75% of the ones that I looked at (I only looked at the most highly voted ones too) did not do any standardization when using Lasso/Ridge $\endgroup$ May 5 '21 at 0:02
  • $\begingroup$ I don't think this question is worth to be responded on SE, It is more suitable for a discussion forum on Kaggle since this is a 100% focuses on what is being done there, and not in what is theoretically correct $\endgroup$
    – Multivac
    May 9 '21 at 14:43
  • 1
    $\begingroup$ @JulioJesus I disagree. SE isn't only for "theoretical" discussions. There's plenty of stuff on here about what is done in practice $\endgroup$ May 9 '21 at 15:03
  • 1
    $\begingroup$ ...especially in such an applied field as DS... $\endgroup$ May 9 '21 at 15:10

Kaggle is a crowd source platform with no quality control. It is to be expected that there will be deviations from best practices.

  • $\begingroup$ Yeah I understand, but I've only looked at the top rated posts for pretty popular datasets, so it's a bit surprising. Do you have any suggestions on other sources that I can look at that have best practices? $\endgroup$ May 5 '21 at 0:05
  • $\begingroup$ Textbooks and package documentation are often higher quality than crowd sourced websites. One reason is they both have many people reviewing them. $\endgroup$ May 5 '21 at 11:23
  • $\begingroup$ Do you have any recommended textbooks for dataset analysis examples? I'm particularly interested in regression analyses. The one book that I have is "Hands on Machine Learning with Scikit-Learn, Keras & Tensorflow," but there was only one example on regression, IIRC, on the california housing dataset. $\endgroup$ May 5 '21 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.