Scikit-learn in Practice Print

  • machinelearningengineering, machine, troubleshooting, guide, howto, solution, zillionkinghost, hosting
  • 0

The classical machine learning library.

WHAT IT PROVIDES

Consistent interfaces across many algorithms Preprocessing transformers Pipelines combining them Model selection and cross-validation Metrics

WHAT THE CONSISTENT INTERFACE MEANS

Fit on training data, then transform or predict.

WHY THAT MATTERS

Algorithms can be swapped without rewriting surrounding code.

WHAT A PIPELINE DOES

Chains preprocessing and a model into one object.

WHY IT IS ESSENTIAL

It prevents leakage, since preprocessing is fitted only on training folds.

WHAT HAPPENS WITHOUT ONE

Scaling fitted on all data, leaking test information.

WHAT COLUMN TRANSFORMERS PROVIDE

Different preprocessing per column type.

WHAT CROSS-VALIDATION UTILITIES PROVIDE

Correct splitting, including grouped and time-based variants.

WHAT TO USE FOR TIME-ORDERED DATA

The time-series split, never the default.

WHAT TO BE CAREFUL WITH

Default parameters, which are starting points not recommendations Metrics chosen by default Fitting transformers outside a pipeline

WHAT IT DOES NOT COVER WELL

Deep learning Very large datasets Gradient boosting at the level dedicated libraries provide

WHAT TO PAIR IT WITH

A dedicated boosting library, for tabular problems.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot