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

Predict re-arrest rate

You developed a survival regression model using covariates about each released convict, including their marital status, prior arrests, etc. Ten new convicts are about to be released, and you will use the model to predict their median time to re-arrest.

The new DataFrame is called prison_new and has the same columns as the old DataFrame prison.

The WeibullAFTFitter class has been imported, and the previously fitted model has been loaded as aft. The pandas and numpy libraries are imported as pd and np, respectively.

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.

# Predict median of new data
aft_pred = ____
Kodu Düzenle ve Çalıştır