% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hardhat.R
\name{predict.tabnet_fit}
\alias{predict.tabnet_fit}
\alias{augment.tabnet_fit}
\title{Predict using \code{tabnet}}
\usage{
\method{predict}{tabnet_fit}(object, new_data, type = NULL, ..., epoch = NULL)

\method{augment}{tabnet_fit}(x, new_data, ...)
}
\arguments{
\item{object, x}{A \code{tabnet_fit} object.}

\item{new_data}{A data frame or matrix of new predictors.}

\item{type}{expected outcome type within  \code{c("numeric", "prob", "class")}.}

\item{...}{Not used, but required for extensibility.}

\item{epoch}{the epoch of an existing checkpoint to infer from.}
}
\value{
\code{\link[=predict]{predict()}} returns a tibble of predictions and \code{\link[=augment]{augment()}} appends the
columns in \code{new_data}. In either case, the number of rows in the tibble is
guaranteed to be the same as the number of rows in \code{new_data}.

For regression data, the prediction is in the column \code{.pred}. For
classification, the class predictions are in \code{.pred_class} and the
probability estimates are in columns with the pattern \verb{.pred_\{level\}} where
\code{level} is the levels of the outcome factor vector.
}
\description{
Predict using \code{tabnet}
}
\examples{
# Minimal example for quick execution
car_split <- rsample::initial_split(mtcars[ 1:6,   ])

\dontrun{
# Fit
if (torch_is_installed() & interactive()) {
 mod <- tabnet_fit(mpg ~ cyl + log(drat), training(car_split))

 # Predict
 predict(mod, testing(car_split))
 augment(mod, testing(car_split))
}
}

}
