Machine learning algorithms in C++
Public Member Functions | Private Attributes
LDA Class Reference

Linear discriminant analysis algorithm. More...

#include <LDA.hpp>

Collaboration diagram for LDA:

Public Member Functions

 LDA (MatrixD data, MatrixD classes)
 Linear discriminant analysis algorithm. More...
 
void fit ()
 
MatrixD transform ()
 Transforms the data matrix using the eigenvectors found by fit() More...
 

Private Attributes

MatrixD X
 
MatrixD y
 
MatrixD eigenvalues
 
MatrixD eigenvectors
 
MatrixD transformedData
 

Detailed Description

Linear discriminant analysis algorithm.

Definition at line 19 of file LDA.hpp.

Constructor & Destructor Documentation

◆ LDA()

LDA::LDA ( MatrixD  data,
MatrixD  classes 
)
inline

Linear discriminant analysis algorithm.

Parameters
dataThe matrix whose linear discriminants will be found
classesColumn vector containing the classes each row element in data belongs to

Definition at line 28 of file LDA.hpp.

Member Function Documentation

◆ fit()

void LDA::fit ( )
inline

Definition at line 35 of file LDA.hpp.

◆ transform()

MatrixD LDA::transform ( )
inline

Transforms the data matrix using the eigenvectors found by fit()

Returns

Definition at line 51 of file LDA.hpp.

Field Documentation

◆ eigenvalues

MatrixD LDA::eigenvalues
private

Definition at line 21 of file LDA.hpp.

◆ eigenvectors

MatrixD LDA::eigenvectors
private

Definition at line 21 of file LDA.hpp.

◆ transformedData

MatrixD LDA::transformedData
private

Definition at line 21 of file LDA.hpp.

◆ X

MatrixD LDA::X
private

Definition at line 21 of file LDA.hpp.

◆ y

MatrixD LDA::y
private

Definition at line 21 of file LDA.hpp.


The documentation for this class was generated from the following file: