% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TrainedInputs.R
\name{TunedInput}
\alias{TunedInput}
\alias{TunedModelRecipe}
\alias{TunedInput.recipe}
\title{Tuned Model Inputs}
\usage{
TunedInput(object, ...)

\method{TunedInput}{recipe}(
  object,
  grid = expand_steps(),
  control = MachineShop::settings("control"),
  metrics = NULL,
  cutoff = MachineShop::settings("cutoff"),
  stat = MachineShop::settings("stat.TrainingParams"),
  ...
)
}
\arguments{
\item{object}{untrained \code{\link[recipes]{recipe}}.}

\item{...}{arguments passed to other methods.}

\item{grid}{\code{RecipeGrid} containing parameter values at which to
evaluate a recipe, such as those returned by \code{\link{expand_steps}}.}

\item{control}{\link[=controls]{control} function, function name, or object
defining the resampling method to be employed.}

\item{metrics}{\link[=metrics]{metric} function, function name, or vector of
these with which to calculate performance.  If not specified, default
metrics defined in the \link{performance} functions are used.  Recipe
selection is based on the first calculated metric.}

\item{cutoff}{argument passed to the \code{metrics} functions.}

\item{stat}{function or character string naming a function to compute a
summary statistic on resampled metric values for recipe tuning.}
}
\value{
\code{TunedModelRecipe} class object that inherits from
\code{TunedInput} and \code{recipe}.
}
\description{
Recipe tuning over a grid of parameter values.
}
\examples{
library(recipes)
data(Boston, package = "MASS")

rec <- recipe(medv ~ ., data = Boston) \%>\%
  step_pca(all_numeric_predictors(), id = "pca")

grid <- expand_steps(
  pca = list(num_comp = 1:2)
)

fit(TunedInput(rec, grid = grid), model = GLMModel)

}
\seealso{
\code{\link{fit}}, \code{\link{resample}}, \code{\link{set_optim}}
}
