mlm_regressor {stressor} | R Documentation |
Fit Machine Learning Regressor Models
Description
Through the PyCaret module from 'python', this function fits many machine learning models simultaneously with without requiring any 'python' programming on the part of the user. This function is specifically designed for the regression models.
Usage
mlm_regressor(
formula,
train_data,
fit_models = c("ada", "et", "lightgbm", "gbr", "lr", "rf", "ridge", "knn", "dt",
"dummy", "lar", "br", "huber", "omp", "lasso", "en", "llar", "par"),
sort_v = c("MAE", "MSE", "RMSE", "R2", "RMSLE", "MAPE"),
n_models = 9999,
seed = NULL,
...
)
Arguments
formula |
A linear formula object. | ||||||||||||||||||||||||||||||||||||
train_data |
A data.frame object that includes data to be trained on. | ||||||||||||||||||||||||||||||||||||
fit_models |
A character vector with all the possible Machine Learning regressors that are currently being fit. The user may specify a subset of them using a character vector.
| ||||||||||||||||||||||||||||||||||||
sort_v |
A character vector indicating what to sort the tuned models on. | ||||||||||||||||||||||||||||||||||||
n_models |
An integer value defaulted to a large integer value to return all possible models. | ||||||||||||||||||||||||||||||||||||
seed |
An integer value to set the seed of the 'python' environment. Default value is set to 'NULL'. | ||||||||||||||||||||||||||||||||||||
... |
Additional arguments passed onto mlm_init. |
Details
'PyCaret' is a 'python' module where machine learning models can be fitted with little coding by the user. The pipeline that 'PyCaret' uses is a setup function to parameterize the data that is easy for all the models to fit on. Then the compare models function is executed, which fits all the models that are currently available. This process takes less than five minutes for data.frame objects that are less than 10,000 rows.
Value
A list object where the first entry is the models fitted and the second is the initial predictive accuracy on the random test data. Returns as two classes '"mlm_stressor"' and '"regressor"'.
Examples
lm_test <- data_gen_lm(20)
create_virtualenv()
mlm_lm <- mlm_regressor(Y ~ ., lm_test)