% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sparsevctrs.R
\name{.recipes_estimate_sparsity}
\alias{.recipes_estimate_sparsity}
\title{Estimate sparsity of a recipe}
\usage{
.recipes_estimate_sparsity(x, ...)
}
\arguments{
\item{x}{An object.}
}
\value{
A recipe
}
\description{
Estimate sparsity of a recipe
}
\details{
Takes a untrained recipe an provides a rough estimate of the sparsity of the
prepped version of the recipe.

Sampling of the input is done to avoid slowdown for larger data sets.

An estimated sparsity of the input data is calculated. Then each step where
\code{sparse = "auto"} or \code{sparse = "yes"} is set, an estimate of how many
predictors will be created and used to modify the estimate.

An initial sparsity of 0 will be used if a zero-row data frame is used in
specification of recipe. This is likely a under-estimate of the true sparsity
of the data.
}
\keyword{internal}
