Employee churn study
Acquiring new employees as replacements incurs hiring costs and training costs. You want to predict how long current employees will stay. This exercise focuses on the first steps to prepare to make predictions.
You have a DataFrame called employees. It contains data about 1470 employees (churned and present) and how their survey answers. The survey is across the following dimensions:
environment_satisfactionjob_satisfactionrelationship_satisfactionwork_life_balance
Additionally, years_at_company means the duration employees have worked and attrition indicates if the employee has churned (1 if churn, 0 otherwise).
Sample rows are printed for you in the console. The CoxPHFitter class is imported for you from the lifelines package.
Este exercício faz parte do curso
Survival Analysis in Python
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Instantiate a CoxPHFitter object cph
cph = ____()
# Fit cph on all covariates
cph.____(____)