Install any skill in seconds. Free to start, no credit card required.
Get Started Free →mkurman/lifelines
Survival analysis in Python: Kaplan-Meier, Cox proportional hazard, Aalen additive, parametric models, and competing risks. Censored data handling for churn, clinical, and actuarial applications.
Passed 22 of 22 test cases with the skill, and 20 of 22 without it.
2 fixed20 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
After executing fit() on a Kaplan-Meier fitter in Python, which method call directly draws the visual step-function survival curve plot?
| Checked | Without skill | With skill |
|---|---|---|
| Calls plot_survival_function on the KaplanMeierFitter instance | Missed | Passed |
The instructions your model reads when the skill loads.
Lifelines is a survival analysis library for Python. It implements Kaplan-Meier, Cox Proportional Hazard, parametric models (Weibull, Log-Normal), and Aalen's additive model. Use it for time-to-event data in clinical trials, churn analysis, reliability engineering, and customer retention studies.
uv pip install lifelines
from lifelines import KaplanMeierFitter
import pandas as pd
T = pd.Series([5, 10, 15, 20, 25, 30]) # durations
E = pd.Series([1, 1, 0, 1, 0, 0]) # event observed?
kmf = KaplanMeierFitter()
kmf.fit(T, E)
kmf.plot_survival_function()
print(kmf.median_survival_time_)
from lifelines import CoxPHFitter
df = pd.DataFrame({
"duration": [5, 10, 15, 20, 25, 30],
"event": [1, 1, 0, 1, 0, 0],
"age": [45, 60, 55, 70, 50, 65],
"treatment": [1, 0, 1, 0, 1, 0],
})
cph = CoxPHFitter()
cph.fit(df, duration_col="duration", event_col="event")
cph.print_summary()
test cases passed, vs 20 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.