my_rf_cv: Random Forest Cross-Validation function

Description Usage Arguments Value Examples

View source: R/my_rf_cv.R

Description

This function does Cross-Validation Random Forest prediction.

Usage

1
my_rf_cv(train, k_cv)

Arguments

train

A training data frame from my_penguins.

k_cv

An int representing the number of folds in cv.

Value

A number of the mean rate of cross-validation the MSE of predictions.

Examples

1
2
3
4
train <- na.omit(my_penguins) %>% dplyr::select(body_mass_g, bill_length_mm,
                                                bill_depth_mm,
                                                flipper_length_mm)
my_rf_cv(train, 5)

Ranul-Liu/STAT302package documentation built on Dec. 18, 2021, 9:52 a.m.