MLPACK  1.0.4
Public Member Functions | Private Attributes
mlpack::pca::PCA Class Reference

List of all members.

Public Member Functions

 PCA (const bool scaleData=false)
 ~PCA ()
 Delete PCA object.
void Apply (const arma::mat &data, arma::mat &transformedData, arma::vec &eigVal, arma::mat &coeff) const
 Apply Principal Component Analysis to the provided data set.
void Apply (const arma::mat &data, arma::mat &transformedData, arma::vec &eigVal) const
 Apply Principal Component Analysis to the provided data set.
void Apply (arma::mat &data, const size_t newDimension) const
 Apply Dimensionality Reduction using Principal Component Analysis to the provided data set.
bool ScaleData () const
 Get whether or not this PCA object will scale (by standard deviation) the data when PCA is performed.
bool & ScaleData ()
 Modify whether or not this PCA object will scale (by standard deviation) the data when PCA is performed.

Private Attributes

bool scaleData

Detailed Description

Definition at line 31 of file pca.hpp.


Constructor & Destructor Documentation

mlpack::pca::PCA::PCA ( const bool  scaleData = false)

Delete PCA object.


Member Function Documentation

void mlpack::pca::PCA::Apply ( const arma::mat &  data,
arma::mat &  transformedData,
arma::vec &  eigVal,
arma::mat &  coeff 
) const

Apply Principal Component Analysis to the provided data set.

Parameters:
data- Data matrix
transformedData- Data with PCA applied
eigVal- contains eigen values in a column vector
coeff- PCA Loadings/Coeffs/EigenVectors
void mlpack::pca::PCA::Apply ( const arma::mat &  data,
arma::mat &  transformedData,
arma::vec &  eigVal 
) const

Apply Principal Component Analysis to the provided data set.

Parameters:
data- Data matrix
transformedData- Data with PCA applied
eigVal- contains eigen values in a column vector
void mlpack::pca::PCA::Apply ( arma::mat &  data,
const size_t  newDimension 
) const

Apply Dimensionality Reduction using Principal Component Analysis to the provided data set.

Parameters:
data- M x N Data matrix
newDimension- matrix consisting of N column vectors, where each vector is the projection of the corresponding data vector from data matrix onto the basis vectors contained in the columns of coeff/eigen vector matrix with only newDimension number of columns chosen.
bool mlpack::pca::PCA::ScaleData ( ) const [inline]

Get whether or not this PCA object will scale (by standard deviation) the data when PCA is performed.

Definition at line 76 of file pca.hpp.

References scaleData.

bool& mlpack::pca::PCA::ScaleData ( ) [inline]

Modify whether or not this PCA object will scale (by standard deviation) the data when PCA is performed.

Definition at line 79 of file pca.hpp.

References scaleData.


Member Data Documentation

Definition at line 82 of file pca.hpp.

Referenced by ScaleData().


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