Machine Learning
Models that learn from data. Linear and logistic regression with gradient descent, trees, ensembles, clustering, and rigorous model evaluation.
- Linear & Logistic Regression with Gradient Descent — The foundation of machine learning. Learn linear regression (model, mean squared error, closed-form least squares), gradient descent (gradients, learning rate, convergence, batch/mini-batch/stochastic), feature scaling, polynomial features, regularisation (L2 ridge, L1 lasso), logistic regression for classification (sigmoid, log-loss/cross-entropy, decision boundary, probability calibration), softmax for multiclass — with runnable NumPy code implementing both models from scratch and checking against least squares.
- Classical ML: Trees, Ensembles, k-NN, SVM & Clustering — The workhorses of tabular data. Learn decision trees (Gini impurity, entropy, information gain, depth and pruning), ensembles (random forests, bagging, gradient boosting — XGBoost/LightGBM), k-nearest neighbours and distance metrics, support vector machines and kernels, Naive Bayes, unsupervised learning (k-means, hierarchical clustering, DBSCAN, PCA), the bias–variance trade-off, feature engineering and pipelines — with NumPy code for k-means and a Gini decision stump.
- Model Evaluation, Validation & Metrics — Knowing whether a model is actually good. Learn the confusion matrix, accuracy, precision, recall, F1, specificity, ROC and AUC, precision–recall curves, threshold selection and cost-sensitive decisions, regression metrics (MAE, RMSE, R², MAPE), calibration, cross-validation (k-fold, stratified, time-series), data leakage, statistical significance of improvements, and evaluating LLMs and ranking systems — with NumPy code computing a full confusion matrix, F1 and ROC-AUC on an imbalanced problem.