Aggregations and Statistics
sum, mean, median, std and var; the axis argument; why NumPy and pandas disagree on std; and handling nan.
Arrays, broadcasting, and vectorised numerical work.
View all tagssum, mean, median, std and var; the axis argument; why NumPy and pandas disagree on std; and handling nan.
Creating ndarrays, the six shape attributes, dtypes, and why an array is not a list.
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.
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.
1-D and 2-D access, why NumPy slices are views rather than copies, boolean masking, and reshape.
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.
Element-wise arithmetic, the broadcasting rules, universal functions, matrix multiplication, sorting and stacking.
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.