DATA MINING
Desktop Survival Guide by Graham Williams |
|||||
Prediction on Test Data |
> data(veteran, package = "randomSurvivalForest") > train.pt <- sample(nrow(veteran), round(nrow(veteran)*0.80)) > veteran.out <- rsf(Survrsf(time, status) ~ ., forest = TRUE, data = veteran[train.pt , ]) > veteran.pred <- predict.rsf(veteran.out, veteran[-train.pt , ]) |