ModelSpecification | R Documentation |
Specification of a relationship between response and predictor variables and a model to define a relationship between them.
ModelSpecification(...)
## Default S3 method:
ModelSpecification(
input,
model,
control = MachineShop::settings("control"),
metrics = NULL,
cutoff = MachineShop::settings("cutoff"),
stat = MachineShop::settings("stat.TrainingParams"),
...
)
## S3 method for class 'formula'
ModelSpecification(formula, data, model, ...)
## S3 method for class 'matrix'
ModelSpecification(x, y, model, ...)
## S3 method for class 'ModelFrame'
ModelSpecification(input, model, ...)
## S3 method for class 'recipe'
ModelSpecification(input, model, ...)
... |
arguments passed from the generic function to its methods. The
first argument of each |
input |
input object defining and containing the model predictor and response variables. |
model |
model function, function name, or object; or another object that can be coerced to a model. |
control |
control function, function name, or object
defining the resampling method to be employed. If
|
metrics |
metric function, function name, or vector of these with which to calculate performance. If not specified, default metrics defined in the performance functions are used. Model selection is based on the first calculated metric. |
cutoff |
argument passed to the |
stat |
function or character string naming a function to compute a summary statistic on resampled metric values for model tuning. |
formula , data |
formula defining the model predictor and response variables and a data frame containing them. |
x , y |
matrix and object containing predictor and response variables. |
ModelSpecification
class object.
fit
, resample
,
set_monitor
, set_optim
## Requires prior installation of suggested package gbm to run
modelspec <- ModelSpecification(
sale_amount ~ ., data = ICHomes, model = GBMModel
)
fit(modelspec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.