Lessons
12 lessonsThe ML Workflow
Supervised vs. unsupervised learning, the end-to-end workflow from problem framing to prediction, and the fit / predict / score pattern shared by every scikit-learn estimator.
Linear Regression
Predicting continuous values: least squares, the cost function, gradient descent, multiple features, polynomial terms, and reading coefficients.
Logistic Regression & Classification
Turning scores into probabilities with the sigmoid, decision boundaries, thresholds, and extending binary classifiers to multiple classes.
Evaluation Metrics
Choosing the metric that matches the real-world cost: MSE and MAE for regression, and accuracy, precision, recall, F1, ROC-AUC, and confusion matrices for classification.
Data Splitting & Cross-validation
Train, validation, and test sets; k-fold and stratified splits; time-series splits; and why you must never touch the test set until the very end.
Overfitting & Regularization
The bias-variance trade-off, learning curves, and how L1 / L2 regularization (Ridge, Lasso, Elastic Net) keep models from memorizing noise.
Decision Trees
How trees split data with Gini impurity and entropy, why they overfit so easily, and how depth limits and pruning control them.
Ensembles: Forests & Boosting
Combining many weak models into a strong one: bagging and random forests, then gradient boosting with XGBoost and LightGBM, the workhorses of tabular data.
k-NN, SVM & Naive Bayes
Three classic algorithms and when each one shines: distance-based prediction, maximum-margin classifiers with kernels, and fast probabilistic baselines for text.
Feature Engineering & Pipelines
Scaling, encoding categories, handling missing values, and creating new features, all wrapped in scikit-learn Pipelines and ColumnTransformers so preprocessing never leaks.
Clustering & PCA
Finding structure without labels: k-means and hierarchical clustering, DBSCAN for odd shapes, and dimensionality reduction with PCA for compression and visualization.
Tuning, Interpretation & Pitfalls
Grid, random, and Bayesian hyperparameter search; explaining predictions with permutation importance and SHAP; and avoiding data leakage, class imbalance, and distribution shift.