R/m10-RF.R

Defines functions predictRF learnRF

Documented in learnRF predictRF

# Copyright (C) Kevin R. Coombes, 2007-2013

# random forest

learnRF <- function(data, status, params, pfun) {
  tdata <- data.frame(Stat=status, t(data))
  model <- randomForest(Stat ~ ., data=tdata)
  FittedModel(pfun, data, status,
              details=list(model=model))
}
predictRF <- function(newdata, details, status, ...) {
  predict(details$model, t(newdata), ...)
}

modelerRF <- Modeler(learnRF, predictRF)

Try the Modeler package in your browser

Any scripts or data that you put into this service are public.

Modeler documentation built on Jan. 9, 2025, 3:01 a.m.