ParsnipModel: Parsnip Model

View source: R/ML_ParsnipModel.R

ParsnipModelR Documentation

Parsnip Model

Description

Convert a model specification from the parsnip package to one that can be used with the MachineShop package.

Usage

ParsnipModel(object, ...)

Arguments

object

model specification from the parsnip package.

...

tuning parameters with which to update object.

Value

ParsnipModel class object that inherits from MLModel.

See Also

as.MLModel, fit, resample

Examples


## Requires prior installation of suggested package parsnip to run

prsp_model <- parsnip::linear_reg(engine = "glmnet")

model <- ParsnipModel(prsp_model, penalty = 1, mixture = 1)
model

model_fit <- fit(sale_amount ~ ., data = ICHomes, model = model)
predict(model_fit)



MachineShop documentation built on Sept. 11, 2024, 6:28 p.m.