50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

recipes (version 1.2.1)

.recipes_estimate_sparsity: Estimate sparity of a recipe

Description

Estimate sparity of a recipe

Usage

.recipes_estimate_sparsity(x, ...)

Value

A recipe

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.