R/oob.error.rate.wsrf.R

Defines functions oob.error.rate.wsrf oob.error.rate

Documented in oob.error.rate oob.error.rate.wsrf

oob.error.rate <- function(object, ...) UseMethod("oob.error.rate")
oob.error.rate.wsrf <- function(object, tree, ...)
{
  if (missing(tree) || (is.logical(tree) && length(tree) == 1 && !tree))
  {
    # return out-of-bag error rate for the forest, length of 1
    return(object[[.RF_OOB_ERROR_RATE_IDX]])
  }
  else
  {
    # return out-of-bag error rates for specific trees
    return(object[[.TREE_OOB_ERROR_RATES_IDX]][tree])
  }
}

Try the wsrf package in your browser

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

wsrf documentation built on Jan. 6, 2023, 5:06 p.m.