Random Survival Forests › Practical Implications
Machine Learning from ScratchAll chapters Random Survival Forests › Practical ImplicationsSection view · Sections in this chapter8 / 10 ↓
Reading tools Definitions, links & notes
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
A survival forest is a candidate when nonlinear relationships, thresholds, or interactions matter and the data contain enough events and follow-up to estimate local curves. Risk stratification can be a predictive goal in clinical or operational time-to-event problems. Suitability still needs comparison with simpler predictors and validation under the intended censoring and deployment conditions. A forest fitted for prediction does not by itself supply a confidence interval for a causal treatment effect.
Define the time origin, event, and censoring mechanism before fitting, then check event counts and risk-set support. Conditional independent censoring alone does not guarantee independent censoring within every pooled leaf. Scaling is not required for threshold comparisons, but missing covariates need an explicit strategy: this scratch implementation has no missing-value routing or imputation. Original RSF work includes missing-data methods, so that limitation should not be attributed to all survival forests. Values outside the training range follow the learned thresholds to a terminal node; the prediction is piecewise constant rather than an extrapolated covariate effect.
Check leaf-size and event-count settings together, then assess sensitivity to feature subsampling and forest size with OOB or validation predictions. Lowering mtry changes the available splits and may change both tree correlation and prediction quality; it does not guarantee an improvement when features are correlated. For a comparison with Cox regression, use the same training and test observations, disclose supplied transformations and tuning, and report the actual mortality-grid and survival-aggregation conventions. Scores on different grids or from different fitted models have no shared absolute risk unit.
Evaluation, interpretation, and limitations
Evaluation separates discrimination from probability accuracy. Harrell's concordance uses comparable observed pairs and tied-risk handling; it does not test the predicted survival probabilities and can depend on censoring and follow-up. Grouped Kaplan–Meier comparisons are aggregate diagnostics under within-group independent censoring. Integrated Brier score measures squared survival-probability error over a stated interval with censoring weights under its assumptions. Report the interval, censoring estimator, and whether evaluation was held out, OOB, or used during tuning. Different metrics answer different questions, so a good concordance value alone does not establish calibration.
Interpret the forest through its fitted curves and explicitly defined summaries. Permutation importance asks how a chosen predictive score changes after a feature is permuted; correlated predictors and unrealistic permutations can complicate that interpretation. Partial dependence and individual conditional expectation describe fitted responses rather than causal effects. Hazard ratios between profiles can vary with time and need additional definitions for discontinuous estimated hazards; they are not ratios of log hazards. A strictly increasing transformation preserves a mortality score's ordering, but that does not turn the score into a calibrated event probability or imply pointwise ordering of two crossing survival curves.
The scratch split search recomputes a sorted risk-set calculation for each threshold. At a node with observations, logrank_statistic sorts in time and then performs linear scans. With up to n_cuts thresholds on each of mtry features, this contributes per search, in addition to quantile and slicing work. This implementation favors clarity over optimized reuse. OOB score storage uses a tree-by-observation matrix, and the illustrative concordance helper allocates observation-by-observation arrays, so its memory cost is quadratic. Prediction traverses each tree for each row and evaluates the requested grid; large datasets may need batching or a more efficient implementation.
Before relying on a prediction, check whether the censoring assumptions are plausible, whether follow-up supports the requested horizon, and whether leaves retain enough events and at-risk observations. Informative censoring can bias risk-set estimates and may require an explicit adjustment or sensitivity analysis. A flat estimated tail is an absence of later observed increments, not evidence that no later events occur. Also check measurement quality and covariate shift: either a forest or a linear model can fail after a distribution change, and crossing a threshold is one possible source of prediction sensitivity. Interactions can require several successive splits; they need not appear in one split, and a weak marginal signal can make greedy discovery difficult.
Split selection introduces another limitation: a maximum over many candidate log-rank statistics does not have the null distribution of one prespecified comparison. A variable with more candidate cuts can have more opportunities to attain a large value by chance. Random feature subsets and event-count constraints restrict the search but do not provide multiplicity-adjusted inference. Use the statistic to choose a predictive split, and do not report its unadjusted chi-square or normal tail area as a covariate-effect test after selection.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!