R/rfsrc_pred.R

Defines functions model_type.rfsrc predict_model.rfsrc

predict_model.rfsrc <- function(x, newdata, type, ...) {
  res <- predict(x, newdata = newdata, ...)
  x=res$predicted
  switch(
    type,
    raw = data.frame(Response = apply(predicted, 1, which.max), stringsAsFactors = FALSE),
    prob = as.data.frame(x, check.names = FALSE)
  )
}
model_type.rfsrc<- function(x, ...) 'classification'
Mthrun/dbt.FlowCytometry documentation built on June 5, 2023, 10:30 a.m.