Train a model encapsulated within a tundraContainer.

train(dataframe, train_args = list(), verbose = FALSE, munge = TRUE)

Arguments

dataframe

data.frame. The dataset to train the model on. This will be preprocessed with the tundraContainer's munge_procedure and then passed as the first argument to the tundraContainer's train_function.

train_args

list. A list of arguments to make available to the tundraContainer's train_function through use of the input keyword. See the examples.

verbose

logical. Either TRUE or FALSE, by default the latter. If TRUE, then output produced by running the munge_procedure or the train_function will not be silenced.

munge

logical. Either TRUE or FALSE, by default the former. If FALSE, the munge_procedure provided to the container during initialization will be assumed to have been trained, and the dataframe provided will not be run through it.

Value

The value returned by the tundraContainer's train_function. Since the train_function has side effects on the container as its primary purpose, this can usually be invisible(NULL).