save_forest: Save elements from forester

View source: R/save.R

save_forestR Documentation

Save elements from forester

Description

Save elements from forester

Usage

save_forest(train, file = NULL, verbose = TRUE, return_name = FALSE)

Arguments

train

The return from 'train' function.

file

A string describing the name and path of the file. By default set to NULL which creates a 'forester_TIMESTAMP' in current working directory.

verbose

A logical value, if set to TRUE, provides all information about training process, if FALSE gives none.

return_name

A logical value, if set to TRUE, function returns \ full path and name of the saved file.

Examples

## Not run: 
# Training the model.
train <- train(data        = iris,
               y           = 'Species',
               bayes_iter  = 0,
               random_eval = 3)

# Saving the outcomes.
save_forest(train, 'saved_train')

# Reading saved file.
train2 <- readRDS('saved_train.RData')

## End(Not run)

ModelOriented/forester documentation built on June 6, 2024, 7:29 a.m.