philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PCA Class Reference

#include <PCA.h>

Inheritance diagram for PCA:
Transformer Predictor

Public Member Functions

 PCA (int k_components=0)
 
void fit (const Matrix< double > &X, const Matrix< double > &y) override
 
Matrix< double > transform (const Matrix< double > &in) override
 
- Public Member Functions inherited from Transformer
Matrix< double > predict (const Matrix< double > &in) override
 
virtual void fit (const Matrix< double > &X, const Matrix< double > &y)=0
 
virtual Matrix< double > predict (const Matrix< double > &)=0
 
virtual Matrix< double > transform (const Matrix< double > &)=0
 

Public Attributes

Matrix< double > PCs
 
Matrix< double > right
 
int keep_components
 

Constructor & Destructor Documentation

◆ PCA()

PCA::PCA ( int  k_components = 0)
inline

Member Function Documentation

◆ fit()

void PCA::fit ( const Matrix< double > &  X,
const Matrix< double > &  y 
)
inlineoverridevirtual

Implements training algorithm

Parameters
Xarray-like with the shape: [n_samples, n_features]
yarray-like with shape: [n_samples, 1]
Returns
this

Implements Predictor.

◆ transform()

Matrix< double > PCA::transform ( const Matrix< double > &  in)
inlineoverridevirtual

Implements Predictor.

Member Data Documentation

◆ keep_components

int PCA::keep_components

◆ PCs

Matrix<double> PCA::PCs

◆ right

Matrix<double> PCA::right

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