Checklist USA-NA-AIO 2025 Round 1 · Task 3
Logistic Regression from Scratch
Preprocess a Titanic-style passenger table and implement logistic regression with gradient descent and Newton's method.
The task
Problem 3 (100 points, 18 parts) uses USAAIO_2025_round1_prob3_train.csv (provided via Google Drive) with columns including Survived, Sex, Age, SibSp, Parch, Fare and Embarked. The contestant writes a data-summary function, selects columns, drops missing rows, engineers GroupSize = SibSp + Parch + 1, one-hot encodes Sex and Embarked, and writes a custom train/test split.
The theory parts derive the sigmoid derivative, the gradient and Hessian of the log-likelihood and its concavity. The coding parts implement a vectorised sigmoid and a class My_Log_Reg with 'GD' and 'Newton' solvers, then train and compare both models by test accuracy.
Abridged by SOTA from the official materials. The official statement has the exact rules, and it wins wherever this summary differs.
At a glance
- You get
USAAIO_2025_round1_prob3_train.csv(Google Drive link in Part 1).- You submit
- Written answers and code in a notebook.
- Scoring
- Test accuracy is printed in Part 18; no automatic leaderboard.
- Rules
- Only the starter imports (numpy, pandas, copy, matplotlib, sklearn StandardScaler).
- All coding tasks run on CPU.
- Format
- 2025 USA-NA-AIO Round 1, 24 March 2025 (date from IOAI news article). Statements and official solutions were posted part by part on the USAAIO forum on 28 March 2025.