bio-machine-learning-survival-analysis
Analyzes time-to-event data using Kaplan-Meier curves, log-rank tests, and Cox proportional hazards regression with lifelines. Builds survival models from clinical and omics features. Use when predicting patient survival or modeling time-to-event outcomes.
npx skills add BioTender-max/awesome-bio-agent-skills --skill bioskills__machine-learning__survival-analysis --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Version Compatibility Reference examples tested with: matplotlib 3.8+, pandas 2.2+ Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # Survival Prediction with lifelines **"Analyze patient survival data"** → Estimate survival curves (Kaplan-Meier), compare groups (log-rank test), and model time-to-event outcomes with Cox proportional hazards regression. - Python: `lifelines.KaplanMeierFitter()`, `lifelines.CoxPHFitter()` ## Kaplan-Meier Curves **Goal:** Estimate and visualize the survival probability function from time-to-event data. **Approach:** Fit a nonparametric Kaplan-Meier estimator to censored survival data and plot the step function. ```python from lifelines import KaplanMeierFitter import matplotlib.pyplot as plt kmf = KaplanMeierFitter() # T: time to event or censoring # E: event indicator (1=event occurred, 0=censored) kmf.fit(T, event_observed=E) # Plot survival curve kmf.plot_survival_function() plt.
- Version Compatibility
- Kaplan-Meier Curves
- Compare Groups with Log-Rank Test
- Cox Proportional Hazards Regression
- Multivariate Cox Model
- Predict Risk Scores
- Check Proportional Hazards Assumption
- Survival at Specific Time
- Feature Selection for Survival
- Related Skills
What does the bio-machine-learning-survival-analysis skill do?
Analyzes time-to-event data using Kaplan-Meier curves, log-rank tests, and Cox proportional hazards regression with lifelines. Builds survival models from clinical and omics features. Use when predicting patient survival or modeling time-to-event outcomes.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill bioskills__machine-learning__survival-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
