Validate: Separate Validation of Trained Decision Forest

Description Usage Arguments Value Author(s) Examples

Description

Permits trained decision forest to be validated separately from training.

Usage

1
2
3
## Default S3 method:
Validate(preFormat, train, y, ctgCensus = "votes",
quantVec = NULL, quantiles = !is.null(quantVec), nThread = 0, verbose = FALSE)

Arguments

preFormat

internal representation of the design matrix, of class PreFormat

train

an object of class Rborist obtained from previous training.

y

the response (outcome) vector, either numerical or categorical. Row count must conform with x.

ctgCensus

report categorical validation by vote or by probability.

quantVec

quantile levels to validate.

quantiles

whether to report quantiles at validation.

nThread

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

verbose

indicates whether to output progress of validation.

Value

an object of class validation:

validation

list containing either a:

ValidReg list of validation results for regression:

yPred vector containing the predicted response.

mae the mean absolute error of prediction.

mse the mean-square error of prediction.

rsq the r-squared statistic.

qPred matrix containing the prediction quantiles, if requested. or a: ValidCtg list of validation results for classification:

yPred vector containing the predicted response.

misprediction vector containing the classwise misprediction rates.

confusion the confusion matrix.

census matrix of predictions, by category.

oobError the out-of-bag error.

prob matrix of prediction probabilities by category, if requested.

Author(s)

Mark Seligman at Suiji.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
    ## Trains without validation.
    rb <- Rborist(x, y, noValidate=TRUE)
    ...
    ## Delayed validation using a PreFormat object.
    pf <- PreFormat(x)
    v <- Validate(pf, rb, y)
  
## End(Not run)

Rborist documentation built on Nov. 1, 2019, 7:45 p.m.