This repository provides the trained Random Survival Forest (RSF) model used in the manuscript:
"Development of novel plasma proteomic biomarkers for cancer-associated thrombosis in an advanced cancer cohort."
final_rsf_vte_model.rds--- Trained RSF model objectdemo_load_model.R--- Example script demonstrating model loading and prediction
Model was trained using:
- R version 4.5.1
- randomForestSRC 3.5.1
- survival 3.8-6
A complete computational environment snapshot is provided in session_info.txt.
To ensure compatibility, we recommend using the same or newer versions.
Install required packages:
install.packages("randomForestSRC")
install.packages("survival")Load packages:
library(randomForestSRC)
library(survival)| Parameter | Value |
|---|---|
| Model Type | Random Survival Forest |
| Outcome | Time to VTE |
| Prediction Target | 180-day VTE risk |
| Trees | 1000 |
| mtry | 74 |
| nodesize | 10 |
Place final_rsf_vte_model.rds in your working directory and run:
library(randomForestSRC)
library(survival)
model <- readRDS("final_rsf_vte_model.rds")
# Example prediction on training data
pred <- predict(model)
t180 <- 180
idx180 <- which.min(abs(pred$time.interest - t180))
risk_180 <- 1 - pred$survival[, idx180]
head(risk_180)For new data, ensure that:
- All predictor variables match those used in training
- The model requires the same predictor variables and preprocessing used during training.
- Raw training data are not publicly available due to patient privacy restrictions.
The model object contains:
- Full forest structure
- Predictor names
- Hyperparameters
- Survival time grid
Users may inspect:
model$call
model$xvar.names