validate: Separate Validation of Trained Decision Forest

View source: R/validate.R

validateR Documentation

Separate Validation of Trained Decision Forest

Description

Permits trained decision forest to be validated separately from training.

Usage

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

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.

Value

an object of one of two classes:

SummaryReg

summarizing regression, consisting of: predictionan object of class PredictReg consisting of: yPredthe estimated numerical response. qPredquantiles of prediction, if requested. qEstquantile of the estimate, if quantiles requested. indicesfinal index of prediction, if requested. validationif validation requested, an object of class ValidReg consisting of: msethe mean-square error of the estimate. rsqthe r-squared statistic of the estimate. maethe mean absolute error of the estimate.

SummaryCtg

summarizing classification, consisting of: predicitonan object of class PredictCtg consisting of: yPredestimated categorical response. censusfactor-valued matrix of the estimate, by category, if requested. probmatrix of estimate probabilities, by category, if requested. indicesfinal index of prediction, if requested. validationif validation requested, an object of class ValidCtg consisting of: confusionthe confusion matrix. mispredictionthe misprediction rate. oobErrorthe out-of-bag error.

Author(s)

Mark Seligman at Suiji.

See Also

Rborist

Examples

## Not run: 
    ## Trains without validation.
    rb <- Rborist(x, y, novalidate=TRUE)
    ...
    ## Delayed validation using a preformatted object.
    pf <- preformat(x)
    v <- validate(pf, rb, y)
  
## End(Not run)

Rborist documentation built on July 26, 2023, 5:32 p.m.