FDAModel {MachineShop} | R 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 |
... |
additional arguments to |
lambda |
shrinkage penalty coefficient. |
df |
alternative specification of |
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)