Classification on the Titanic using sklearn

Click here to watch a series of videos on fitting and evaluating logistic regression models on the Titanic dataset using ‘sklearn’
Author

George I. Hagstrom

Published

September 27, 2026

I have recorded a series of videos covering how to implement and evaluate logistic regression models in ‘sklearn’. I used the ‘titanic’ dataset, which contains information on titanic passengers and whether or not they survived. I show how to build a pipeline that preprocesses data, engineers features, and fits a logistic regression model, and I showed how to extract coefficients from that model, plot calibration curves and ROC curves, calculate the log loss and the accuracy score, and calculate a variety of other standard metrics (F1 score, precision, recall, etc). The video recording process was a bit clunky and the live coding was a bit buggy, so I’ve used a bit of cutting/video editing to make things smoother, so there may be some jumps.

Video Link Runtime
Logistic Regression Vignette 6: Model Comparison and Interactions 21:46
Logistic Regression Vignette 5: Marginal Effects 13:39
Logistic Regression Vignette 4: Calibration Curves and ROC 10:58
Logistic Regression Vignette 3: Coefficients and Odds Ratios 6:55
Logistic Regression Vignette 2: Pipelines and Fit 13:15
Logistic Regression Vignette 1: Titanic EDA 14:04

You can download my python notebook here: logistic regression vignette