Learn R Programming

MachineShop (version 2.8.0)

ModeledInput: ModeledInput Classes

Description

Class for storing a model input and specification pair for MachineShop model fitting.

Usage

ModeledInput(x, ...)

# S3 method for formula ModeledInput(x, data, model, ...)

# S3 method for matrix ModeledInput(x, y, model, ...)

# S3 method for ModelFrame ModeledInput(x, model, ...)

# S3 method for recipe ModeledInput(x, model, ...)

# S3 method for MLModel ModeledInput(x, ...)

# S3 method for MLModelFunction ModeledInput(x, ...)

Arguments

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.

Value

ModeledFrame or ModeledRecipe class object that inherits from ModelFrame or recipe.

See Also

fit, resample, SelectedInput

Examples

Run this code
# NOT RUN {
## 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)

# }

Run the code above in your browser using DataLab