Compare Weibull model parameters
Some convicts in the study were released on parole. Because parolees experience stricter restrictions, you suspect that their initial arrest rate is high but decreases as time goes on, while other convicts' arrest rate increases as time goes on.
You will fit a Weibull estimator to parolees and non-parolees separately. You will then compare their model parameters to verify your hypothesis. The DataFrame you will use is called prison.
The matplotlib.pyplot library is imported as plt, the pandas and numpy libraries are imported as pd and np, respectively. The WeibullFitter class has been imported for you and a new instance called wb has been created. Use the console to explore the DataFrame as needed.
Cet exercice fait partie du cours
Survival Analysis in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Mask for parole
parole = (____ == ____)