Conceptual
Login

Scikit-Learn Estimator API

Every scikit-learn object follows one contract — fit(X, y) learns state into trailing-underscore attributes, predict/transform applies it — which is what makes Pipelines possible: chained transformers plus a final estimator behave as a single estimator. Pipelines guarantee preprocessing is fit only on training folds, which is the API-level defense against leakage.

This Concept is waiting for its first lesson!

Every scikit-learn object follows one contract — fit(X, y) learns state into trailing-underscore attributes, predict/transform applies it — which is what makes Pipelines possible: chained transformers plus a final estimator behave as a single estimator. Pipelines guarantee preprocessing is fit only on training folds, which is the API-level defense against leakage.

Are you a teacher? Sign in to start contributing.

Sign In