Learn R Programming

Covid19Wastewater (version 1.0.1)

gen_OOB_pred: get OOB predictions of the training dataset returns the predictions of each row of the input data using only trees not trained on the row

Description

get OOB predictions of the training dataset returns the predictions of each row of the input data using only trees not trained on the row

Usage

gen_OOB_pred(tree_model, incMSE = NA, resid = FALSE)

Value

data.frame or vector of oob predictions

Arguments

tree_model

random_linear_forest object you want the OOB predictions of

incMSE

if its a numeric scramble the given column

resid

if True return the residuals of the model instead

Examples

Run this code
data(Example_data, package = "Covid19Wastewater")
model <- random_linear_forest(Example_data, 2, PMMoV ~ N1 + N2 | pcr_type)
gen_OOB_pred(model, resid = TRUE)

Run the code above in your browser using DataLab