← AI GitHub

AI GitHub

scikit-learn for reproducible machine-learning baselines

Build predictive pipelines with consistent preprocessing, validation and estimator APIs.

Science and ResearchData and RetrievalPublished 2 min read

Key Takeaways

  • Pipelines connect transforms and estimators so preprocessing can be fitted inside cross-validation folds.
  • Start with a baseline estimator and put transformations inside its pipeline.
  • Build a baseline for one tabular dataset and evaluate it with the split appropriate to how predictions will be used.
  • Random splits can leak users, time periods or related records across training and test sets.

How it works

Pipelines connect transforms and estimators so preprocessing can be fitted inside cross-validation folds. Model-selection utilities make it possible to compare choices under the same splits.

What you need

Start with a baseline estimator and put transformations inside its pipeline. Pick metrics and data splits before choosing a more complex model.

What to try first

Build a baseline for one tabular dataset and evaluate it with the split appropriate to how predictions will be used. Include a trivial reference estimator.

Build a pipeline that handles a category absent during fitting. Include the case in validation before you deploy a model that receives new records.

Where to look for failures

Random splits can leak users, time periods or related records across training and test sets. Choose the split before optimizing the model.

Related Franklin pages

Keep data splits, features and metric settings fixed when comparing tabular baselines. Measure model size and serving time alongside predictive performance.

For a primer on learning from data and evaluating predictions, see Franklin’s glossary. Machine learning

Project documentation

Try it for your workflow

Explore the project’s documentation for setup and usage, or save this page to a collection for later.

Read the project documentation ↗