Robust coxph cindex

From XuShuwenn/RedAct · View interactive version

Robust coxph cindex is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Fit a Cox proportional hazards model with scikit-survival robustly on small or collinear datasets and report the concordance index.

How to use this skill

Skill file

Robust Cox PH Concordance Index

This skill provides a reliable workflow for fitting a Cox proportional hazards (Cox PH) model using scikit-survival and reporting the concordance index (C-index), especially on small datasets and those with highly correlated features.

When to Use

Use this skill when you need to:

Core Workflow

  1. Validate input schema
  1. Select and prepare features
  1. Fit a penalized Cox PH model
  1. Compute risk scores and C-index
  1. Format and write output

"Concordance index: X.XXXX"

Verification

Perform these checks before finalizing:

Common Pitfalls

Optional Script Usage

Use the helper script to run the complete workflow end-to-end on a CSV file.

Example:

python scripts/coxph_cindex.py --input data.csv --time time --event event

python scripts/coxph_cindex.py --input data.csv --time time --event event --features feature1,feature2,feature3 --alpha 0.01 --output output.txt

Script behavior:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.