Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


Rborist (version 0.1-8)

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), qBin = 5000)

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.

qBin

bin size for facilating quantiles at large sample count.

Value

an object of class validation:

validation

list containing the results of validation: ValidReg list of validation results for regression: yPred vector containing the predicted response.

mse the mean-square error of prediction.

rsq the r-squared statistic.

qPred matrix containing the prediction quantiles, if requested. 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.

prob matrix of prediction probabilities by category, if requested.

Examples

Run this code
# 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)
  
# }

Run the code above in your browser using DataLab