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

How good is the fit?

You used the Weibull model to fit the prison convict DataFrame prison. But is this the right model to use?

You will evaluate the goodness-of-fit of the model wb using the QQ plot.

The WeibullFitter class has been imported for you, and a Weibull model instance wb has been fitted to the data. The matplotlib.pyplot library is imported as plt, and the pandas and numpy libraries are imported as pd and np, respectively. Use the console to explore the DataFrame and its column names as needed.

Bu egzersiz

Survival Analysis in Python

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

Egzersiz talimatları

  • Import the qq_plot function from lifelines.plotting.
  • Plot the QQ plot of the fitted model wb.
  • Display the QQ plot.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import qq_plot
from lifelines.plotting import ____

# Plot qq_plot of wb
____

# Display figure
____
Kodu Düzenle ve Çalıştır