Learn R Programming

Rborist (version 0.3-7)

validate: Separate Validation of Trained Decision Forest

Description

Permits trained decision forest to be validated separately from training.

Usage

# S3 method for default
validate(train, sampler, preFormat = NULL,  ctgCensus
= "votes", impPermute = 0, quantVec = NULL, quantiles =
!is.null(quantVec), indexing = FALSE, trapUnobserved = FALSE, nThread = 0, verbose =
FALSE, ...)

Value

either of two pairs of objects:

  • SummaryReg summarizing regression, as documented with the command predict.arbTrain.

  • validation an object of class ValidReg consisting of:

    • mse the mean-square error of the estimate.

    • rsq the r-squared statistic of the estimate.

    • mae the mean absolute error of the estimate.

  • SummaryCtg summarizing classification, as documented with the command predict.arbTrain.

  • validation an object of class ValidCtg consisting of:

    • confusion the confusion matrix.

    • misprediction the misprediction rate.

    • oobError the out-of-bag error.

Arguments

train

an object of class Rborist obtained from previous training.

sampler

summarizes the response and its per-tree samplgin.

preFormat

internal representation of the design matrix, of class PreFormat

ctgCensus

report categorical validation by vote or by probability.

impPermute

specifies the number of importance permutations: 0 or 1.

quantVec

quantile levels to validate.

quantiles

whether to report quantiles at validation.

indexing

whether to report final index, typically terminal, of tree traversal.

trapUnobserved

indicates whether to return a nonterminal for values unobserved during training, such as missing data.

nThread

suggests an OpenMP-style thread count. Zero denotes the default processor setting.

verbose

indicates whether to output progress of validation.

...

not currently used.

Author

Mark Seligman at Suiji.

Examples

Run this code
if (FALSE) {
    ## Trains without validation.
    rb <- Rborist(x, y, novalidate=TRUE)
    ...
    ## Delayed validation using a preformatted object.
    pf <- preformat(x)
    v <- validate(pf, rb, y)
  }

Run the code above in your browser using DataLab