Rborist (version 0.2-3)

Validate: Separate Validation of Trained Decision Forest

Description

Permits trained decision forest to be validated separately from training.

Usage

# S3 method for default
Validate(preFormat, train, y, ctgCensus = "votes",
quantVec = NULL, quantiles = !is.null(quantVec), nThread = 0, verbose = FALSE)

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.

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.

Author

Mark Seligman at Suiji.

Examples

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

Run the code above in your browser using DataCamp Workspace