biotender-max/awesome-bio-agent-skills/bioskills-machine-learning-survival-analysis
Claude Code and agent skill by biotender-max/awesome-bio-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install biotender-max/awesome-bio-agent-skills/bioskills-machine-learning-survival-analysisSKILL.md
The same SKILL.md was published earlier as biotender-max/awesome-bio-agent-skills/bioskills-machine-learning-survival-analysis.
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>thenhelp(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.
Compare Groups with Log-Rank Test
Goal: Test whether survival distributions differ significantly between risk groups.
Approach: Fit separate Kaplan-Meier curves per group, overlay them, and apply a log-rank test for statistical comparison.
Cox Proportional Hazards Regression
Goal: Model the effect of covariates on survival time using a semi-parametric hazard model.
Approach: Fit a Cox PH model to extract hazard ratios, confidence intervals, and a concordance index for predictive accuracy.
Multivariate Cox Model
Goal: Assess the independent prognostic value of clinical and molecular features in a single model.
Approach: Combine clinical covariates and gene expression values into a regularized Cox model to identify independently prognostic variables.
Predict Risk Scores
Goal: Stratify patients into risk groups based on a fitted Cox model.
Approach: Compute partial hazard scores from model coefficients and split at the median to define high/low risk groups for downstream KM visualization.
Check Proportional Hazards Assumption
Goal: Verify that the proportional hazards assumption holds for all covariates.
Approach: Run the built-in Schoenfeld residual tests and inspect diagnostic plots for time-varying effects.
Survival at Specific Time
Goal: Extract survival probability estimates at clinically meaningful time points.
Approach: Query the fitted Kaplan-Meier survival function at specific durations and report the median survival time.
Feature Selection for Survival
Goal: Screen thousands of genes to identify those significantly associated with patient survival.
Approach: Fit univariate Cox models for each gene, extract hazard ratios and p-values, and rank candidates for multivariate modeling.
Related Skills
- clinical-databases/variant-prioritization - Clinical variant interpretation
- differential-expression/de-results - Find DE genes for survival model
- machine-learning/biomarker-discovery - Select predictive features
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bioskills/bioskills__machine-learning__survival-analysis/SKILL.md
Popularity
- Repository stars
- 193
- Repository forks
- 33
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/biotender-max/awesome-bio-agent-skills/bioskills-machine-learning-survival-analysis)