Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Scikit-Learn

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Cross validation in scikit-learn supports pipeline in addition to vanilla models. Please refer to Cross Validation Pipeline for more details.

  2. Label encoding is an easy way to convert a categorical response/target variable to a numeric one and back to the raw value space. For transform of response/target varible in regression, please refer to Transforming Target in Tegression.

  3. Skorch

References

https://scikit-learn.org/stable/modules/compose.html#transforming-target-in-regression

Split a Dataset into Train and Test Datasets in Python

Comments