oob_errors: Helper for 'rang_oob_err()'

View source: R/rang.R

oob_errorsR Documentation

Helper for rang_oob_err()

Description

Returns vector of error indicators chosen by majority vote. Where the vote is split the entry wil be 0.5. The entry will be NaN Where there are no out-of-bag predictions for a data point.

Usage

oob_errors(oob_mat, n_trees, target)

Arguments

oob_mat

Matrix of out-of-bag individual tree class predicitions with an NA where the prediciton was in bag. Rows are observation, columns are trees.

n_trees

Positive integer. Gives the number of trees to be used in the prediction (columns 1:n_trees of oob_mat will be used).

target

Vector of true classes (either 1 or 2).


jedwards24/jemodel documentation built on July 1, 2023, 3:59 p.m.