Learn R Programming

boostr (version 1.0.0)

defaultOOBPerformanceAnalysis: Perform generic out-of-bag error analysis.

Description

If performing regression, calculate which out-of-bag residuals and MSE. Otherwise, calculate which out-of-bag observations were classified correctly, what the overall misclassification rate is, as well as the confusion matrix.

Usage

defaultOOBPerformanceAnalysis(prediction, response, oobObs)

Arguments

prediction
a vector of predicted responses.
response
a vector of true response.
oobObs
a vector of indices which values in predictions are of out-of-bag observations.

Value

If performing regression, return a list with components:
oobMSE
the out-of-bag mean squared error.
resVec
a vector of length nrow(data) whose entries correspond to observations in data. The entry has values NA if the observation was not out-of-bag, and the difference between the predicted and true response (the residual) if the observation was out-of-bag.
Otherwise, return a list with components:
oobErr
overall misclassification rate.
oobConfMat
the confusion matrix of out-of-bag predictions against the true class labels.
errVec
a vector of length nrow(data) whose entries correspond to observations in data. The entry has values NA if the observation was not out-of-bag, and a 1 or 0 depending whether estimator failed to correctly classify the observation.

See Also

Other performance analyzers: boost, boost.function, boost.list