dot-recipes_estimate_sparsity: Estimate sparsity of a recipe

.recipes_estimate_sparsityR Documentation

Estimate sparsity of a recipe

Description

Estimate sparsity of a recipe

Usage

.recipes_estimate_sparsity(x, ...)

Arguments

x

An object.

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 sparse = "auto" or 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.

Value

A recipe


tidymodels/recipes documentation built on April 17, 2025, 6:17 p.m.