#machine-learning
- 23 Dec 2024 · Study
Machine Learning · Hyperparameter search
Tuning with GridSearchCV and RandomizedSearchCV, nested evaluation on a held-out test set, and why random search often wins.
- 13 Dec 2024 · Study
Machine Learning · Feature engineering
Creating better inputs: ratios, date parts, binning, interactions, log transforms for skewed values, and target-free encodings.
- 5 Dec 2024 · Study
Machine Learning · scikit-learn pipelines
Combining preprocessing and model with Pipeline and ColumnTransformer for mixed numeric and categorical data, so one object is fitted, tuned and saved.
- 27 Nov 2024 · Study
Machine Learning · Cross-validation
k-fold, stratified and grouped cross-validation, why one train/test split is noisy, and avoiding leakage by preprocessing inside the folds.
- 19 Nov 2024 · Study
Machine Learning · Model evaluation metrics
Confusion matrix, accuracy and why it fails on imbalanced data, precision, recall, F1, ROC-AUC, and regression metrics.
- 11 Nov 2024 · Study
Machine Learning · PCA
Principal component analysis: rotating data onto directions of maximum variance, explained variance ratio, and compressing the digits dataset.
- 1 Nov 2024 · Study
Machine Learning · Hierarchical clustering and DBSCAN
Two alternatives to k-means: agglomerative clustering, which builds a tree of merges, and DBSCAN, which finds dense regions of any shape and labels noise.
- 24 Oct 2024 · Study
Machine Learning · k-means clustering
Unsupervised clustering with k-means: the assign/update loop, inertia, choosing k with the elbow and silhouette score.
- 16 Oct 2024 · Study
Machine Learning · Support vector machines
SVMs find the widest-margin boundary; support vectors, the C parameter, and the kernel trick for non-linear data.
- 8 Oct 2024 · Study
Machine Learning · Boosting and XGBoost
Boosting builds shallow trees one after another, each fixing the previous errors; gradient boosting, learning rate, early stopping, and XGBoost.
- 30 Sept 2024 · Study
Machine Learning · Random forest
Bagging many decorrelated trees: bootstrap samples, random feature subsets, out-of-bag score, and feature importances.
- 20 Sept 2024 · Study
Machine Learning · Decision trees
How a decision tree chooses splits using Gini impurity, why deep trees overfit, and reading the learned rules.
- 12 Sept 2024 · Study
Machine Learning · k-nearest neighbours
k-NN classifies by majority vote of the closest training points; why scaling matters and how k controls the bias–variance trade-off.
- 4 Sept 2024 · Study
Machine Learning · Regularisation: ridge and lasso
Overfitting with too many features, and how L2 (ridge) shrinks weights while L1 (lasso) drives some exactly to zero.
- 27 Aug 2024 · Study
Machine Learning · Logistic regression
Logistic regression for binary classification: the sigmoid, log-loss, decision thresholds, and predicted probabilities.
- 19 Aug 2024 · Study
Machine Learning · Gradient descent
Fitting linear regression by gradient descent from scratch: the gradient of MSE, the learning rate, and what happens when it is too small or too big.
- 9 Aug 2024 · Study
Machine Learning · Linear regression
Linear regression with many features: the model, the squared-error cost, the normal equation, and scikit-learn's LinearRegression with RMSE and R².
- 1 Aug 2024 · Study
Machine Learning · The ML workflow
The end-to-end supervised learning loop: define the task, split data, pick a baseline, fit, evaluate on held-out data, iterate.