dot-recipes_estimate_sparsity: Estimate sparity of a recipe

.recipes_estimate_sparsityR Documentation

Estimate sparity of a recipe

Description

Estimate sparity 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 predictores 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 Jan. 25, 2025, 7:30 a.m.