1. Learn
  2. /
  3. Courses
  4. /
  5. Survival Analysis in Python

Exercise

Plotting the survival curve

You learned that there are different ways to plot the survival function from the Kaplan-Meier estimator. A survival function on the term lengths of Canadian senators has been fitted for you using KaplanMeierFitter and the instance is called senator_kmf. Try plotting senator_kmf in the console. After each plot, you may run plt.clf() to clear the figure.

Select the correct ways to plot the survival function.

  • A. senator_kmf.plot_survival_function()
  • B. senator_kmf.plot_survival_distribution()
  • C. senator_kmf.survival_function_.plot()
  • D. plt.plot(senator_kmf)
  • E. senator_kmf.plot()

Instructions

50 XP

Possible answers