Survival ML and Evaluation
Meet one of Dr. Rao's 686 breast-cancer patients: a 49-year-old whose tumour was 18 mm, grade 2, with two positive lymph nodes. Five years after surgery her cancer had still never returned; the study simply ended with her recurrence-free. (That last fact, a patient still event-free at her final visit, is the right-censoring from Lesson 1.)
Six lessons have handed you models for a patient like her: Kaplan-Meier, the Cox model, parametric survival, competing risks. Each one assumed a SHAPE for how risk behaves. This lesson does two new things. First, it lets a model learn the shape on its own, with a random survival forest. Second, and more important, it teaches you to score any survival model honestly, because a prediction you cannot check is a prediction you cannot trust.
By the end of this lesson you will be able to:
- Explain how a random survival forest grows survival trees and averages them, with no proportional-hazards or parametric assumption
- Measure how well a model RANKS risk with Harrell's C-index, the survival cousin of the AUC
- Measure whether its predicted probabilities are HONEST, with a survival calibration curve and the time-dependent Brier score
- Put two rival models on trial and let the scores, not their reputations, pick the winner
Prerequisites: Lesson 1 (right-censoring, Surv(), the survival function), Lesson 2 (the Kaplan-Meier curve and the log-rank test), and Lesson 3 (the Cox model, the hazard ratio, and its risk score). You can fit a Cox model and read a coefficient table.
When a straight-line risk is not enough
The Cox model from Lesson 3 is a workhorse, but it makes two promises about the data. The proportional-hazards promise: every patient's hazard is the one baseline curve scaled by a constant, so no risk factor's effect is allowed to grow or fade over time. And a log-linear promise: the risk score is a straight-line sum, \(\beta_1 x_1 + \beta_2 x_2 + \cdots\), so one extra positive lymph node moves the risk by the same amount whether the patient had zero nodes or twenty.
Real tumours rarely honour that. The jump from 1 positive node to 3 need not equal the jump from 18 to 20, and node count and tumour grade may interact in ways no single straight line can trace. When the true risk surface bends, a model forced to stay straight will misread it.
A decision tree makes no such promise. It carves the patients into groups with yes/no questions ("3 or fewer positive nodes?", "tumour under 15 mm?") and lets each group have its own survival experience. Stack many such trees into a forest and you get a random survival forest: a model that learns the shape of risk from the data instead of being told it in advance. The tree below is one such survival tree; each of its leaves holds its own survival curve.