mlm_refit {stressor} | R Documentation |
Refit Machine Learning Models
Description
Refits models fitted in the mlm_init, and returns the predictions.
Usage
mlm_refit(mlm_object, train_data, test_data, classification = FALSE)
Arguments
mlm_object |
A '"mlm_stressor"' object. |
train_data |
A data.frame object used for refitting excludes the test data. Can be 'NULL' to allow for predictions to be used on the current model. |
test_data |
A data.frame object used for predictions. |
classification |
A Boolean value used to represent if classification methods need to be used to refit the data. |
Value
A matrix with the predictions of the various machine learning methods.
Examples
lm_train <- data_gen_lm(20)
train_idx <- sample.int(20, 5)
train <- lm_train[train_idx, ]
test <- lm_train[-train_idx, ]
create_virtualenv()
mlm_lm <- mlm_regressor(Y ~ ., lm_train)
mlm_refit(mlm_lm, train, test, classification = FALSE)
[Package stressor version 0.2.0 Index]