Preview. This page currently shows the analysis skeleton. The full worked walkthrough — sample dataset, connected steps, runnable code, interpretation — is being built.
HR / People Analytics · how-to
Flight Risk — predict which employees will resign — in Python
A turnover-prediction analysis. Every step below is the same analysis rendered for Python — grounded in the source, honest where Python can't do a step cleanly.
Same analysis, your tool
DERIVE
logistic regression needs numeric inputs; encode categoricals
df["derived"] = exprCORRELATE
screen which variables actually track turnover before modeling
df["driver_j"].corr(df["outcome"])FIT-CLASSIFIER
estimate the equation linking predictors to probability of resigning
LogisticRegression().fit(X, y)VALIDITY · mechanical
confirm each predictor contributes reliably
df["measure"].corr(df["criterion"])PREDICT
score each employee's likelihood of leaving to prioritize retention
model.predict(df)Grounded in
Predictive HR Analytics with Excel, Sec 19.8 Logistic Regression: Predict Staff Resignation (also 12.4, 17.9)
Doing HR / People Analytics work?
The full HR / People Analytics guide covers this and the whole workflow around it — reconciled from the field’s best books.
Want to run it, not read it?
Run this analysis live on your data, in Python or any tool — powered by the Stepcode engine.