Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ModeledInput-methods

ModeledInput Classes


Description

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

Usage

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, ...)

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

Examples

## 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)

MachineShop

Machine Learning Models and Tools

v2.8.0
GPL-3
Authors
Brian J Smith [aut, cre]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.