ulda | R Documentation |
This function performs Uncorrelated Linear Discriminant Analysis (ULDA) on a given dataset. ULDA seeks linear combinations of features that provide maximum class separation while ensuring that the resulting discriminant axes are mutually uncorrelated. It is particularly useful for dimensionality reduction and classification tasks in high-dimensional spaces.
ulda(X, Y, preproc = center(), mu = 0, tol = 1e-06)
X |
A numeric matrix of size |
Y |
A factor or numeric vector of length |
preproc |
A preprocessing function from the |
mu |
A regularization parameter (currently unused, but included for extensibility). Default is 0. |
tol |
A numeric tolerance level. Singular values smaller than |
The procedure for ULDA can be summarized as follows:
Preprocessing: The data X
is preprocessed using the specified preproc
function.
Class Statistics: Compute class probabilities, class means, and the global mean of the preprocessed data.
Between-Class Scatter: Form a matrix Hb
that captures between-class differences weighted by class probabilities.
Total Scatter: Form the total scatter matrix via the centered data Ht
.
SVD of Total Scatter: Perform Singular Value Decomposition (SVD) on Ht
to capture the most significant directions of variability.
Projection onto Between-Class Structure: Use SVD on a transformed version of Hb
to find directions that maximize class separation.
Final Projection: Combine the transformations to yield a projection matrix whose columns are discriminant vectors that are uncorrelated.
Projection of Data: Project the preprocessed data onto these discriminant vectors to get the final scores.
This approach ensures that the resulting discriminants are uncorrelated linear combinations of features.
An object of class discriminant_projector
from multivarious
, which contains:
rotation
: The final projection matrix mapping the original feature space to the ULDA space.
s
: The scores (projected data) of size n x r
, where r
is the reduced dimension.
sdev
: The standard deviations of the projected components.
labels
: The class labels.
preproc
: The preprocessing object used.
classes
: A string "ulda" indicating the type of projector.
prep
, eigs_sym
, discriminant_projector
## Not run:
data(iris)
X <- as.matrix(iris[, 1:4])
Y <- iris[, 5]
res <- ulda(X, Y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.