Machine Learning with Scikit-learn

Study Machine Learning with Scikit-learn with full lessons, revision notes and quick reference, across 37 lessons.

12 modules. 37 lessons. Self-paced.

Roles this course prepares you for

Course curriculum

No exam weights apply. Lessons follow practical prerequisites: the estimator contract, data and splits, leak-free preprocessing, regression and classification models, model selection, unsupervised learning, inspection, persistence and diagnosis, then a final challenge.

Free to read: 5 lessons, no account needed

Start Here (2 lessons)
  1. How this course works (read now)

    • Describe what the course covers, what it leaves to its related courses and how the three study views are used.
    • Confirm readiness by predicting the output of a short Python script and by reading a NumPy shape and a pandas column.
  2. Set up the pinned environment (read now)

    • Create ~/sklearn-practice/.venv, install the pinned requirements and confirm the versions with the supplied check script.
    • Diagnose the three most common setup failures from their messages.
The Estimator Contract (2 lessons)
  1. Fit, predict and score (read now)

    • Fit a classifier on a bundled dataset, predict and score it, and tell hyperparameters from fitted attributes.
    • Use get_params, set_params and clone, and predict the error raised when predict runs before fit.
  2. Transform and pandas output (read now)

    • Fit a transformer on training rows only and apply it to new rows with transform.
    • Return DataFrames from transformers with set_output and read feature names in and out.
Data and Splits (2 lessons)
  1. Load bundled and generated data (read now)

    • Load bundled datasets as DataFrames and separate features from the target.
    • Generate the Rivermead demand and dock-fault tables with the supplied seeded script and confirm their shapes.
  2. Split for the situation

    • Choose random, stratified, grouped or time-ordered splits and say what leaks when the wrong one is used.
    • Assert class balance, group disjointness and time order after a split.

With course access: 32 lessons

Leak-Free Preprocessing (3 lessons)
  1. Scale, encode and impute

    • Choose a scaler, an encoder and an imputer for each column type and read what each one learned.
    • Handle unknown and rare categories and flag imputed values.
  2. Build a leak-free pipeline

    • Build a ColumnTransformer and a Pipeline that impute, scale and encode by column type before a classifier.
    • Inspect what each fitted step learned and find the leak in a script that preprocesses before splitting.
  3. Custom transformers and feature names

    • Wrap a function with FunctionTransformer and write a minimal transformer class that learns in fit.
    • Keep column names through a pipeline and print a named coefficient table.
Regression Models (4 lessons)
  1. Baselines and regression metrics

    • Score a regression model against a dummy baseline with MAE, RMSE and R squared and say what each number means.
    • Read a residual plot and describe its pattern in words.
  2. Linear models and regularisation

    • Fit LinearRegression, Ridge, Lasso and ElasticNet on scaled features and read how alpha changes the coefficients.
    • Use RidgeCV and LassoCV to choose alpha and explain Lasso's zero coefficients.
  3. Trees and forests for regression

    • Fit and read a DecisionTreeRegressor with max_depth and min_samples_leaf, and print its rules.
    • Fit a RandomForestRegressor, set n_estimators and max_features, and explain why trees do not extrapolate.
  4. Boosting, neighbours and SVR

    • Fit HistGradientBoostingRegressor with learning_rate, max_iter and early stopping, and let it handle missing values.
    • Fit KNeighborsRegressor and SVR on scaled features and compare all the regression models by error and fitting time.
Classification Models (6 lessons)
  1. Baselines and the confusion matrix

    • Score a classifier against a DummyClassifier and read a confusion matrix in scikit-learn's order.
    • Compute precision, recall and F1 by hand from the four counts and check them against the library.
  2. Logistic regression and class weights

    • Set C, l1_ratio and max_iter on LogisticRegression and read a convergence warning.
    • Handle imbalance with class_weight="balanced" or resampling of the training rows only, and compare recall and precision.
  3. Scores, curves and AUC

    • Distinguish predict, predict_proba and decision_function and pass the right one to roc_auc_score.
    • Draw and read ROC and precision-recall curves and compute average precision.
  4. Choose a decision threshold

    • Tune a threshold with TunedThresholdClassifierCV on cross-validation folds and set one with FixedThresholdClassifier.
    • Read precision and recall across thresholds with metric_at_thresholds and justify the chosen cut-off.
  5. SVMs, neighbours and naive Bayes

    • Fit SVC, LinearSVC, KNeighborsClassifier and GaussianNB inside scaling pipelines and compare them.
    • Use decision_function for SVC scores and explain why its probability option is deprecated.
  6. Trees and ensembles for classification

    • Fit DecisionTreeClassifier, RandomForestClassifier and HistGradientBoostingClassifier on the dock-fault table and compare them.
    • Use native categorical and missing-value support in histogram gradient boosting and explain when it beats a forest.
Model Selection (6 lessons)
  1. Cross-validate with the right splitter

    • Run cross_validate with KFold, StratifiedKFold, GroupKFold and TimeSeriesSplit and read the fold spread.
    • Report training and validation scores together and explain the default splitter for classifiers.
  2. Score with the right metric

    • Pass scorer strings and a dict of scorers to cross_validate and read the neg_ convention.
    • Build a custom scorer with make_scorer and check it against a manual calculation.
  3. Grid and random search

    • Tune pipeline parameters with GridSearchCV and RandomizedSearchCV and read cv_results_.
    • Separate the selection score from one final held-out score.
  4. Halving search and nested cross-validation

    • Run HalvingRandomSearchCV with its enabling import inside a bounded budget.
    • Run one small nested cross-validation and explain when it is worth its cost.
  5. Read learning and validation curves

    • Produce validation and learning curves with their Display classes and read bias and variance from them.
    • Choose the next change for four curve patterns.
  6. Choose a model family

    • Summarise each model family's prediction rule, capacity settings and preprocessing needs in one table.
    • Use the estimator map's heuristics to pick a family and a first setting for a described problem.
Unsupervised Learning (4 lessons)
  1. Cluster with k-means

    • Run KMeans with n_init="auto" and choose k with inertia and silhouette scores.
    • Explain what k-means assumes and what a high silhouette does not prove.
  2. Density and hierarchical clustering

    • Run DBSCAN with eps and min_samples and read the noise label.
    • Run AgglomerativeClustering with different linkages and compare clusterings with Davies-Bouldin and Calinski-Harabasz scores.
  3. Reduce dimensions with PCA

    • Standardise then fit PCA, read explained variance and choose a component count as an integer or a variance fraction.
    • Explain why PCA without scaling follows the largest-unit feature.
  4. PCA in a pipeline, and t-SNE

    • Put PCA before a classifier in a pipeline and tune n_components jointly with the model.
    • Describe t-SNE as a visualisation tool with its perplexity, randomness and cost, and say what its picture cannot show.
Inspect Fitted Models (3 lessons)
  1. Coefficients and tree rules

    • Read coefficients with their scaling and print tree rules with export_text.
    • Explain why an unscaled coefficient cannot be compared across features.
  2. Feature importance two ways

    • Compare impurity-based feature_importances_ with permutation_importance on held-out data.
    • Explain the effect of correlated features on both measures.
  3. Partial dependence and ICE

    • Draw partial dependence and ICE plots with PartialDependenceDisplay and describe them in words.
    • State the independence assumption and choose between the brute and recursion methods.
Save, Reload and Reuse (2 lessons)
  1. Save with skops and joblib

    • Save a fitted pipeline with skops, inspect its untrusted types and reload it; save a joblib copy with a versions file.
    • Explain the pickle warning and InconsistentVersionWarning.
  2. Build a batch predictor

    • Write a command-line program that loads the saved pipeline, checks its versions and column names, and predicts for a CSV of new rows.
    • Run the supplied pytest tests against it.
Diagnose Failures (2 lessons)
  1. Convergence, categories and missing values

    • Fix a convergence warning, an unknown-category error and a missing-value error from their messages.
    • Name the evidence that confirms each cause before changing code.
  2. Shapes, leakage, randomness and speed

    • Fix a feature-count mismatch, a leaked preprocessing step, a non-reproducible result and a slow search.
    • Use n_jobs without oversubscription and run one partial_fit example.
Final Challenge (1 lessons)
  1. Final challenge: trip cancellations

    • Build, tune, inspect, persist and document an end-to-end pipeline on the trip-cancellation table that passes the supplied acceptance checks.
    • Write a short decision note that explains the split, the metric and the threshold.

Study views

  • Full Course
  • Revision
  • Quick Reference

Who this is for

For developers, analysts and students who can write small Python programs and want to build, tune, check and reuse machine learning models with scikit-learn.

Before you begin

  • Write a short Python script, read a traceback, use a terminal and a virtual environment, and read a NumPy shape and a pandas column.
  • Python 3.12 to 3.15 with the documented pinned scikit-learn, NumPy, SciPy, pandas, Matplotlib, joblib, skops, threadpoolctl and pytest versions. Core work runs locally without a GPU or cloud account.

What you will learn

  • Build leak-free pipelines and choose the right split, metric and decision threshold.
  • Tune and compare models with cross-validation, then inspect what a fitted model learned.
  • Save a pipeline safely with its versions, reuse it from a tested predictor, and diagnose common failures.

Unlock all 37 lessons

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

Know what is included

Independent learning material from Vectametric. Not affiliated with or endorsed by the organisations behind the tools it teaches. Practice exams and projects are separate. Completing a course is not a professional certification.

Questions about courses

Are these video courses or reading courses?

The current courses use written lessons, examples and diagrams. Full Course, Revision and Cheat Sheet or Quick Reference views cover the same learning sequence at different levels of detail.

Which course should I start with?

Choose a Certification Course for a named exam, a Career Path Course for a role-led sequence, or a Skill Course for a focused subject. Read its level, prerequisites and curriculum before enrolling.

Do revision notes replace the full lessons?

No. Start with the full explanations, then use revision notes to refresh your understanding. Cheat sheets are concise study references, not a substitute for learning or permission to use notes during an official exam.

Are practice exams and projects included?

No. Course access, practice-exam bundles and project access are separate. An official certification, exam booking or voucher is not included.

How long do I have access?

The course page and checkout show the current online access period and price, including free enrollment where offered. Access starts when enrollment is confirmed and does not auto-renew.

Can I read lessons before enrolling?

Yes. Each course opens its first lessons to read without an account, and some courses are open in full. The course curriculum marks the lessons you can read now. Course access adds the remaining lessons, the Revision and Cheat Sheet or Quick Reference views, saved progress, bookmarks and personal notes.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy