Back to Projects
Deep Learning / Model Evaluation

Titanic Survival Prediction: Optimiser Comparison

A controlled, progressively rigorous comparison of the Adam and RMSprop optimisers on a binary classification task — from baseline training through regularisation, early stopping, and 5-fold cross-validation — to establish an evidence-based optimiser selection methodology.

Type
Binary Classification
Domain
Model Evaluation Methodology
Methods
Adam, RMSprop, Cross-Validation
Status
Completed
OPTIMISER EVALUATION
4-STAGE METHODOLOGY
BASELINE COMPARISON
REGULARISATION + DROPOUT
EARLY STOPPING
5-FOLD CROSS-VALIDATION

The Challenge

Adam and RMSprop land within a single percentage point of each other after 5-fold cross-validation (82.83% vs 81.93%) — proof that for this dataset, disciplined evaluation methodology matters far more than optimiser choice.

Choice of optimiser is one of the most consequential, and most under-examined, decisions in neural network training. This project used the classic Titanic survival dataset (891 records, 12 raw features) as a controlled test bed to systematically compare Adam against RMSprop, not just on raw accuracy, but through progressively more rigorous evaluation: baseline comparison, regularisation, early stopping, and cross-validation.

Approach

01
Preprocessing
Dropped identifier and free-text columns, imputed missing Age and Embarked values, one-hot encoded Sex and Embarked (12 → 10 features), then split 70/10/20 (train/validation/test) with stratification on survival, scaling only after the split to prevent data leakage.
02
Baseline Comparison
Trained identical 10-64-32-1 architectures (ReLU hidden layers, Sigmoid output) with Adam and RMSprop for 10 epochs each, holding every other hyperparameter constant.
03
Regularisation & Early Stopping
Added L2 regularisation (λ = 0.01) and dropout (rate = 0.1) to both optimisers, then layered in early stopping (patience = 1) to halt training as soon as validation loss plateaued.
04
Cross-Validation
Ran 5-fold stratified cross-validation on the fully regularised, early-stopped models to get a robust, low-variance estimate of each optimiser's true generalisation performance.

Results

82.83% ± 4.78%
Adam, 5-fold cross-validated accuracy (best overall performer)
81.93% ± 4.30%
RMSprop, 5-fold cross-validated accuracy (more stable validation loss)
84.3%
RMSprop's best precision figure across configurations tested

Across every stage of evaluation, the two optimisers landed within a percentage point or two of each other, a result that is itself informative: for a small-to-medium tabular dataset like this, optimiser choice matters far less than getting preprocessing, regularisation, and validation strategy right. Adam consistently converged faster and edged out RMSprop on balanced accuracy and F1 score after cross-validation, while RMSprop consistently showed more stable validation loss and better precision, fewer false positives, at a small cost to recall.

Regularisation and early stopping made a real, measurable difference for both optimisers, reducing overfitting and improving validation stability, and the confidence intervals from 5-fold cross-validation overlap enough that the practical choice between Adam and RMSprop should be driven by the deployment context rather than treated as a settled question.

Business Impact

The recommendation is context-dependent rather than a single winner: Adam with early stopping for scenarios that need maximum survivor identification (higher recall, at the cost of some false positives), and RMSprop with regularisation where minimising false positives matters more than catching every case. More broadly, the project demonstrates a disciplined evaluation methodology, baseline → regularise → early-stop → cross-validate, that generalises well beyond this dataset to any binary classification problem where a confident, defensible model choice is needed.

Technology Stack

Python TensorFlow / Keras Scikit-learn Adam RMSprop L2 Regularisation Cross-Validation
Interested in this work or something similar?