Predict before they leave!
In this exercise, you will use the variables you just created to predict how long current employees will stay.
In the previous exercise, you fitted the data to a CoxPHFitter model object called cph. You also created the following variables to use for prediction:
current_employees: DataFrame for all employees that are still present.current_employees_last_obs: Series referring to the durations column of DataFramecurrent_employees.
The model object cph you just fitted the data to, DataFrame current_employees, and Series current_employees_last_obs are loaded for you. Now you can use them to help the HR department with this prediction task!
Este ejercicio forma parte del curso
Survival Analysis in Python
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Predict survival function conditional on existing durations
____.predict_survival_function(____)