CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.34k stars 554 forks source link

Getting the results of plot_partial_effects_on_outcome in tabular format #1177

Open Dekermanjian opened 3 years ago

Dekermanjian commented 3 years ago

Hello, is there any way to get the results from the function plot_partial_effects_on_outcome in tabular format? This could be useful to see what the probability of survival is for certain risk profiles.

Dekermanjian commented 3 years ago

Okay, I figured out that you can get the values from the plot itself like this: if you name your plot g then: g[0].get_children()[0].get_xydata()

CamDavidsonPilon commented 3 years ago

Hi @Dekermanjian - that's a heavily requested feature, so I think I'll expose this somehow in the next release.