scikit-learn, by Fitting It
One interface, the models behind it, and the evaluation that stops you believing a number that is not real - every example fitted on the page.
About this track
scikit-learn has one interface and about two hundred algorithms behind it. fit, predict and transform are most of the API, and once they are familiar a new model is a new import and nothing else.
The harder half is not the models but knowing whether a score is real. This track spends as much time on splitting, cross-validation, pipelines and leakage as on the estimators, because that is where the mistakes are. Every editor fits a real model in your browser.
The NumPy and pandas tracks cover the arrays and frames that feed every estimator here, and the Machine Learning track covers the theory these modules apply.
What you will be able to do
- Reach for fit, predict and transform on any estimator in the library, and swap one model for another without changing the code around it.
- Split data so that the score you report is one you can believe, and recognise the shapes of leakage that quietly inflate it.
- Put every preprocessing step inside a Pipeline, so that what is fitted on the training fold stays fitted on the training fold.
- Choose a metric that answers the question actually being asked, rather than the one that reads highest.
- Tune hyperparameters with a search that is itself cross-validated, and know what the resulting number does and does not mean.
How the track is ordered
The estimator API comes first, because it is the part that transfers to every model in the library. Then data - shapes, loading, and the train/test split that everything after it depends on. Regression and classification arrive next as the two shapes of supervised problem, followed immediately by evaluation, because a model without an honest score is not worth having. Preprocessing, pipelines and column handling come after that, since they are where leakage creeps in. The later modules are the estimators worth knowing, tuning, and the unsupervised pair.
Where this leads
The track ends where a real project begins: a pipeline you can cross-validate, tune and save. What comes after is mostly not scikit-learn - gradient boosting libraries, deep learning, and the deployment and monitoring that decide whether a model is any use in production.
All 23 modules, in teaching order
- 01fit, predict, transform
- 02Loading and Shaping Data
- 03Splitting Train and Test
- 04Linear Regression
- 05Regression Metrics
- 06Logistic Regression
- 07Classification Metrics
- 08The Confusion Matrix
- 09Probabilities and Thresholds
- 10Class Imbalance
- 11Cross-Validation
- 12Overfitting and Underfitting
- 13Scaling Features
- 14Encoding Categories
- 15Missing Values
- 16Pipelines in scikit-learn
- 17Different Columns, Different Treatment
- 18Leakage in a scikit-learn Workflow
- 19Decision Trees
- 20Random Forests
- 21Hyperparameter Search
- 22k-Means Clustering
- 23A Complete Workflow