fastolda: Fast Orthogonal LDA

View source: R/fast_olda.R

fastoldaR Documentation

Fast Orthogonal LDA

Description

Perform a fast Orthogonal Linear Discriminant Analysis (OLDA) based on provided data and class labels.

Usage

fastolda(X, Y, preproc = center(), reg = 0.01)

Arguments

X

A matrix (n x d) with n samples and d features.

Y

A factor with length n, providing the class/group label for each sample.

preproc

A pre-processing step, such as center(), from multivarious. Default is center().

reg

A numeric regularization parameter (default = 0.01). This is used to ensure invertibility of certain matrices.

Details

This function performs OLDA by pre-processing the data, computing difference-based scatter matrices, and then solving for a discriminant projection. The final result is returned as a discriminant_projector object from the multivarious package.

Value

A discriminant_projector object containing:

  • rotation: The matrix of loadings (d x r) where r is the reduced dimension.

  • s: The scores matrix (n x r), i.e., X %*% rotation.

  • sdev: Standard deviations of the scores.

  • labels: The class labels.

  • preproc: The preprocessing object.


bbuchsbaum/discursive documentation built on April 14, 2025, 4:57 p.m.