Applications and Major Techniques
The eight major machine learning techniques, the question each one answers, and how to read a real problem statement and work out which technique it is.
Algorithms, evaluation, and the reasoning behind them.
View all tagsThe eight major machine learning techniques, the question each one answers, and how to read a real problem statement and work out which technique it is.
One decision left — how many rows the model looks at before each step. "Stochastic is faster" turns out to need a unit attached, because batch beat single-row descent on passes, on seconds and on final cost, single-row descent could not converge at all at a constant step size, and yet mini-batch 32 reached a loose target after reading 4% of one pass where batch read 50 full passes and still missed.
Complete overview and navigation guide for CT exam preparation
Turning categories into numbers without inventing an order — how much label encoding really costs, why it depends on the model, what cardinality does to memory, and the leak hiding inside target encoding.
Why MAE, MSE and RMSE can report three different numbers for the same predictions, why RMSE is never below MAE, what their ratio tells you about outliers, and why scikit-learn hands back a negative mean squared error.
Which models need scaling and which are provably indifferent, why one outlier ruins MinMaxScaler, what log transforms actually fix, and how large the scaling leak really is.
Walking downhill in fog, made precise — why two different plots both get called the gradient descent curve, why the algorithm slows near the bottom with nothing in the loop programming a brake, why flipping one minus sign sends the cost to 6.33e+07, and why the neat round bowl in every textbook is the one case that never happens in practice.
Why read_csv is not a neutral loader, the missingness it silently fails to catch, a pre-flight audit that catches it, and whether to convert to NumPy at all.
The loss function is how you tell a model what "good" means, and changing it changes the answer. Three losses gave three different slopes on identical data; absolute error ignored an outlier at 60, 200 and 10000 alike; counting mistakes turned out to be unminimisable, with 1998 of 2000 gradients exactly zero; and squared error on a sigmoid was 11014x weaker than cross-entropy exactly where the model was most wrong.
Introduction to machine learning, types of learning, and fundamental concepts
Why a value is missing decides what you may do about it — MCAR, MAR and MNAR, what mean imputation costs a distribution, when a smarter imputer pays, and the fit/transform contract that keeps it honest.
More than one feature — the normal equations solved by hand, why a coefficient changes when a correlated feature joins it, and the measurement showing Adjusted R² fails to penalise 100 columns of pure noise while cross-validation catches them cleanly.
What the IQR rule really flags, why outliers hide each other, the extreme point no single column can see, which treatment actually works, and the features a model cannot invent for itself.
Settles why R² can exceed 1 or go negative, why SST = SSR + SSE only holds for a least-squares fit, why adding a junk feature never lowers R² but does lower Adjusted R², and why scikit-learn's MAPE returns 0.0296 rather than 2.96%.
The paradigm with no dataset — an agent learns by acting, receiving rewards and penalties, and the exploration-exploitation tradeoff that decides whether it finds the best policy or settles for a mediocre one.
Fitting a line to one feature — the two coefficients derived by hand and checked against scikit-learn, the five error measures computed from the same residuals, and why a genuinely useful feature can look exactly like noise.
The learning rate is your stride length, and there is an exact cutoff between working and exploding that you can compute instead of guess — verified to 3.3e-16. Also why an alpha 0.4% too large looks merely slow for a thousand iterations, why overshooting is the fastest regime rather than a fault, and why the textbook optimal alpha measured 2.20x slower than a slightly smaller one.
Solving for every coefficient in one algebraic step — the design matrix, the column of ones, the normal equation verified against scikit-learn, and the three situations where the inverse does not exist.
The five Python libraries that do the work, how they stack, scikit-learn's fit/predict/transform contract, and the seven-step pipeline every project follows.
Why a held-out set is mandatory, how much the score depends purely on random_state, and the four situations where a random split reports a number that is simply false.
Features and the numeric/categorical divide, the positive class, and the three learning paradigms — supervised, unsupervised and semi-supervised — separated by what your data actually contains.
Learning without being explicitly programmed — why the rule-based approach collapsed, what replaced it, why the idea only became practical recently, and how AI, ML and DL nest.