my_rf_cv: random forest

Description Usage Arguments Value Examples

View source: R/my_rf_cv.R

Description

This function performs k-fold cross validation on a random forest model generated from internal data on penguins. Model trained is body_mass_g ~ bill_length_mm + bill_depth_mm + flipper_length_mm and number of trees is 100. User can specify the number of folds to be used.

Usage

1

Arguments

k

A numeric indicating the number of folds

Value

Returns average mean squared error of the random forest model across all k folds from k-fold cross-validation

Examples

1
2

dzeng8/STAT302PACKAGE documentation built on Dec. 20, 2021, 2:19 a.m.