Kingma & Ba, Adam: A Method for Stochastic Optimization, ICLR 2015
You have a logistic regression whose features span three orders of magnitude in scale, from a standard deviation of 0.01 up to 10. One global learning rate is either far too large for the wide features or far too small for the narrow ones, and plain SGD stalls well short of the achievable loss.
Kingma & Ba's answer is to give every parameter its own effective step size, derived from running estimates of the first and second moments of its gradient:
Both estimates start at zero, so early on they are biased toward zero. The paper's correction is what makes the first few dozen steps usable:
You will build the loss and its gradient, then three optimisers on the same loop, and show the ordering the paper reports.
Establish why one global step size cannot work here.
Implement explore_conditioning(train_df) returning:
n_rows, n_featurespositive_rate: the mean of y, rounded to 5 placeswidest_std and narrowest_std: the largest and smallest per-feature standard deviation, rounded to 5 placescondition_ratio: widest divided by narrowest, rounded to 2 placesThe features are x0 through x11. That ratio is the whole reason this project exists: a step size tuned for the widest feature barely moves the narrowest one.
Evaluated server-side against a hidden test set.