View source: R/models_gipsMultQDA.R
| gipsmultqda | R Documentation |
Quadratic Discriminant Analysis (QDA) in which each class covariance matrix is projected using the gipsmult framework, allowing for structured permutation symmetry across multiple covariance matrices.
gipsmultqda(x, ...)
## S3 method for class 'formula'
gipsmultqda(formula, data, ..., subset, na.action)
## Default S3 method:
gipsmultqda(x, grouping, prior = proportions,
nu = 5, MAP = TRUE, optimizer = NULL, max_iter = NULL, ...)
## S3 method for class 'data.frame'
gipsmultqda(x, ...)
## S3 method for class 'matrix'
gipsmultqda(x, grouping, ..., subset, na.action)
x |
(required if no formula is given as the principal argument) a matrix or data frame containing the explanatory variables. |
... |
Arguments passed to or from other methods. |
formula |
A formula of the form |
data |
An optional data frame, list or environment from which variables
specified in |
grouping |
A factor specifying the class for each observation. |
prior |
Prior probabilities of class membership. Must sum to one. |
nu |
Degrees of freedom parameter used internally during covariance projection. |
MAP |
Logical; if |
optimizer |
Character string specifying the optimization method used
for covariance projection. If |
max_iter |
Maximum number of iterations for stochastic optimizers. |
subset |
An index vector specifying the cases to be used in the training sample. (NOTE: must be named.) |
na.action |
A function specifying the action to be taken if |
This function is a modification of qda in which the
class-specific covariance matrices are jointly projected to improve
numerical stability and exploit shared symmetry assumptions.
In contrast to classical QDA, which estimates each class covariance matrix
independently, gipsmultqda performs a joint projection of all class
covariance matrices using the gipsmult framework. This allows the
incorporation of shared permutation symmetries and can improve classification
performance in high-dimensional or small-sample regimes.
Several classification rules are available via
predict.gipsmultqda, including plug-in, predictive, debiased,
and leave-one-out cross-validation.
An object of class "gipsmultqda" containing:
prior: prior probabilities of the groups
counts: number of observations per group
means: group means
scaling: array of group-specific scaling matrices derived
from the projected covariance matrices
ldet: log-determinants of the projected covariance matrices
lev: class labels
N: total number of observations
optimization_info: information returned by the covariance
projection optimizer
call: the matched call
This function is not a drop-in replacement for qda.
The covariance estimation, returned object, and classification rules
differ substantially.
The theoretical background and details of the covariance projection are
documented in the gipsmult package.
qda, predict.gipsmultqda,
gipsqda, gipslda
tr <- sample(1:50, 25)
train <- rbind(iris3[tr, , 1], iris3[tr, , 2], iris3[tr, , 3])
test <- rbind(iris3[-tr, , 1], iris3[-tr, , 2], iris3[-tr, , 3])
cl <- factor(c(rep("s", 25), rep("c", 25), rep("v", 25)))
z <- gipsmultqda(train, cl)
predict(z, test)$class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.