ModeledInput {MachineShop} | R Documentation |
Class for storing a model input and specification pair for MachineShop model fitting.
ModeledInput(x, ...) ## S3 method for class 'formula' ModeledInput(x, data, model, ...) ## S3 method for class 'matrix' ModeledInput(x, y, model, ...) ## S3 method for class 'ModelFrame' ModeledInput(x, model, ...) ## S3 method for class 'recipe' ModeledInput(x, model, ...) ## S3 method for class 'MLModel' ModeledInput(x, ...) ## S3 method for class 'MLModelFunction' ModeledInput(x, ...)
x |
input specifying a relationship between model predictor and response variables. Alternatively, a model function or call may be given first followed by the input specification. |
... |
arguments passed to other methods. |
data |
data frame or an object that can be converted to one. |
model |
model function, function name, or call. |
y |
response variable. |
ModeledFrame
or ModeledRecipe
class object that
inherits from ModelFrame
or recipe
.
## Modeled model frame mod_mf <- ModeledInput(sale_amount ~ ., data = ICHomes, model = GLMModel) fit(mod_mf) ## Modeled recipe library(recipes) rec <- recipe(sale_amount ~ ., data = ICHomes) mod_rec <- ModeledInput(rec, model = GLMModel) fit(mod_rec)