Learn R Programming

MachineShop (version 3.3.0)

ModeledInput: ModeledInput Classes

Description

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

Usage

ModeledInput(...)

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

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

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

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

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

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

Arguments

...

arguments passed from the generic function to its methods. The first argument of each ModeledInput method is positional and, as such, must be given first in calls to them.

formula, data

formula defining the model predictor and response variables and a data frame containing them.

model

model function, function name, or object; or another object that can be coerced to a model. Can be given first followed by any of the variable specifications.

x, y

matrix and object containing predictor and response variables.

object

input object defining and containing the model predictor and response variables.

Value

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

See Also

as.MLModel, 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