\name{fit_codez}
\alias{fit_codez}
\title{Fit a codez 2.0 model}
\usage{
fit_codez(df, ..., dates = NULL, control = codez_control())
}
\arguments{
\item{df}{A data frame with time features on columns.}
\item{...}{Arguments passed to \code{codez()}.}
\item{dates}{Optional Date vector with one value per row of \code{df}.}
\item{control}{A \code{codez_control()} object.}
}
\value{
A \code{codez_model} object containing the legacy result, tidy forecasts,
baseline backtests, controls, call, and backend metadata.
}
\description{
\code{fit_codez()} is the codez 2.0 workflow wrapper. It keeps \code{codez()}
as the forecasting engine, then attaches tidy forecasts, rolling baseline
comparisons, the training call, and S3 methods.
}
\examples{
\dontrun{
model <- fit_codez(
  amzn_aapl_fb[, -1],
  dates = as.Date(amzn_aapl_fb$Date),
  seq_len = 20,
  n_samp = 3,
  n_windows = 5
)
predict(model)
summary(model)
autoplot(model)
}
}
