BaşlayınÜcretsiz Başlayın

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_satisfaction
  • job_satisfaction
  • relationship_satisfaction
  • work_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.

Bu egzersiz

Survival Analysis in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Instantiate a CoxPHFitter object cph
cph = ____()

# Fit cph on all covariates
cph.____(____)
Kodu Düzenle ve Çalıştır