details_discrim_linear_sparsediscrim {parsnip}R Documentation

Linear discriminant analysis via regularization

Description

Functions in the sparsediscrim package fit different types of linear discriminant analysis model that regularize the estimates (like the mean or covariance).

Details

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_linear(regularization_method = character(0)) %>% 
  set_engine("sparsediscrim") %>% 
  translate()
## Linear Discriminant Model Specification (classification)
## 
## Main Arguments:
##   regularization_method = character(0)
## 
## Computational engine: sparsediscrim 
## 
## Model fit template:
## discrim::fit_regularized_linear(x = missing_arg(), y = missing_arg(), 
##     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 fit(), parsnip will convert factor columns to indicators.

Variance calculations are used in these computations so zero-variance predictors (i.e., with a single unique value) should be eliminated before fitting the model.

Case weights

The underlying model implementation does not allow for case weights.

References


[Package parsnip version 1.2.1 Index]