Skip to content

tausurv.trees.random_survival_forest

class RandomSurvivalForest(*, n_estimators: int = 100, max_depth: int | None = None, min_samples_leaf: int = 15, max_features: int | str | None = 'sqrt', bootstrap: bool = True, seed: int | None = None)

Random Survival Forest (Ishwaran et al., 2008).

Bootstrap-aggregates log-rank survival trees with per-node random feature subsampling. Predictions average cumulative-hazard estimates across trees. The fit and predict paths are implemented in compiled Rust (tausurv.core.fit_log_rank_forest); this Python class is a thin wrapper exposing the SurvivalPredictor contract.

  • n_estimators — int, default 100
  • max_depth — int, optional
  • min_samples_leaf — int, default 15
  • max_features — int | "sqrt" | "all" | None, default "sqrt" — Features sampled per split. "sqrt" is ⌊d⌋\lfloor \sqrt d \rfloor; "all" / None uses every feature.
  • bootstrap — bool, default True — Resample with replacement for each tree.
  • seed — int, optional
  • times_ — (k,) array — Unique training event times — the model’s natural time grid.

Ishwaran, H., Kogalur, U. B., Blackstone, E. H., Lauer, M. S. (2008). Random survival forests. Annals of Applied Statistics, 2(3).