my_rf_cv: Random forest cross-validation

Description Usage Arguments Value Examples

View source: R/my_rf_cv.R

Description

This function uses a random forest algorithm with 100 trees on the my_penguins data from the palmerpenguins package to predict output body_mass_g with covariates bill_length_mm, bill_depth_mm, and flipper_length_mm. Also computes the cross-validation mean square error.

Usage

1

Arguments

k

An integer representing the number of folds used in cross-validation.

Value

Numeric representing the cross-validation error, or the average MSE across all folds.

Examples

1
2

adammcbroom/STAT302package documentation built on Dec. 18, 2021, 10:25 p.m.