FDAModel: Flexible and Penalized Discriminant Analysis Models

Description Usage Arguments Details Value See Also Examples

View source: R/ML_FDAModel.R

Description

Performs flexible discriminant analysis.

Usage

1
2
3
4
5
6
7
8
9
FDAModel(
  theta = NULL,
  dimension = NULL,
  eps = .Machine$double.eps,
  method = .(mda::polyreg),
  ...
)

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

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 values for the NULL arguments and further model details can be found in the source links below.

Value

MLModel class object.

See Also

fda, predict.fda, fit, resample

Examples

1
2
3
4
5
6
7
8
9
## 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 June 18, 2021, 9:06 a.m.