FDAModel: Flexible and Penalized Discriminant Analysis Models

View source: R/ML_FDAModel.R

FDAModelR Documentation

Flexible and Penalized Discriminant Analysis Models

Description

Performs flexible discriminant analysis.

Usage

FDAModel(
  theta = matrix(NA, 0, 0),
  dimension = integer(),
  eps = .Machine$double.eps,
  method = .(mda::polyreg),
  ...
)

PDAModel(lambda = 1, df = numeric(), ...)

Arguments

theta

optional matrix of class scores, typically with number of columns less than one minus the number of classes.

dimension

dimension of the discriminant subspace, less than the number of classes, to use for prediction.

eps

numeric threshold for small singular values for excluding discriminant variables.

method

regression function used in optimal scaling. The default of linear regression is provided by polyreg from the mda package. For penalized discriminant analysis, gen.ridge is appropriate. Other possibilities are mars for multivariate adaptive regression splines and bruto for adaptive backfitting of additive splines. Use the . operator to quote specified functions.

...

additional arguments to method for FDAModel and to FDAModel for PDAModel.

lambda

shrinkage penalty coefficient.

df

alternative specification of lambda in terms of equivalent degrees of freedom.

Details

Response types:

factor

Automatic tuning of grid parameters:
  • FDAModel: nprune, degree*

  • PDAModel: lambda

* excluded from grids by default

The predict function for this model additionally accepts the following argument.

prior

prior class membership probabilities for prediction data if different from the training set.

Default argument values and further model details can be found in the source See Also links below.

Value

MLModel class object.

See Also

fda, predict.fda, fit, resample

Examples


## Requires prior installation of suggested package mda to run

fit(Species ~ ., data = iris, model = FDAModel)



## Requires prior installation of suggested package mda to run

fit(Species ~ ., data = iris, model = PDAModel)



MachineShop documentation built on Sept. 11, 2024, 6:28 p.m.