Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
fit_transform vs transform in scikit-learn
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
fit_transform
is used on training data whiletransform
is used on test data.
References¶
What and why behind fit_transform() and transform() in scikit-learn!
Tree-Based Models in scikit-learn
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Comments¶
- If you want a simple decision tree,
DecisionTreeRegressor is prefer to DecisionTreeClassifier as DecisionTreeRegressor is more flexible.
As a matter of fact, ensemble tree-based models (no matter classifiers or regressors) are based on DecisionTreeRegressor instead of DecisionTreeClassifier .
Visualize Decision Trees¶
What is the meaning of "value" in a node in sklearn decisiontree plot_tree
Tips on Scikit-Learn
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
-
Cross validation in scikit-learn supports pipeline in addition to vanilla models. Please refer to Cross Validation Pipeline for more details.
-
Label encoding is an easy way to convert a categorical response …