man/rmd/discrim_quad_sparsediscrim.md

For this engine, there is a single mode: classification

Tuning Parameters

This model has 1 tuning parameter:

The possible values of this parameter, and the functions that they execute, are:

Translation from parsnip to the original package

The discrim extension package is required to fit this model.

library(discrim)

discrim_quad(regularization_method = character(0)) |> 
  set_engine("sparsediscrim") |> 
  translate()
## Quadratic Discriminant Model Specification (classification)
## 
## Main Arguments:
##   regularization_method = character(0)
## 
## Computational engine: sparsediscrim 
## 
## Model fit template:
## discrim::fit_regularized_quad(x = missing_arg(), y = missing_arg(), 
##     regularization_method = character(0))

Preprocessing requirements

Factor/categorical predictors need to be converted to numeric values (e.g., dummy or indicator variables) for this engine. When using the formula method via \code{\link[=fit.model_spec]{fit()}}, parsnip will convert factor columns to indicators.

Variance calculations are used in these computations within each outcome class. For this reason, zero-variance predictors (i.e., with a single unique value) within each class should be eliminated before fitting the model.

Case weights

The underlying model implementation does not allow for case weights.

Prediction types

parsnip:::get_from_env("discrim_quad_predict") |>
  dplyr::filter(engine == "sparsediscrim") |>
  dplyr::select(mode, type)
## # A tibble: 3 x 2
##   mode           type 
##   <chr>          <chr>
## 1 classification class
## 2 classification prob 
## 3 classification raw

References



Try the parsnip package in your browser

Any scripts or data that you put into this service are public.

parsnip documentation built on Jan. 11, 2026, 9:06 a.m.