OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions
OpenANN::PCA Class Reference

Principal component analysis. More...

#include <PCA.h>

+ Inheritance diagram for OpenANN::PCA:

Public Member Functions

 PCA (int components, bool whiten=true)
 Create PCA. More...
 
virtual Transformerfit (const Eigen::MatrixXd &X)
 Fit transformation according to training set X. More...
 
virtual Eigen::MatrixXd transform (const Eigen::MatrixXd &X)
 Transform the data. More...
 
Eigen::VectorXd explainedVarianceRatio ()
 Get the ratio of explained variance for each transformed feature. More...
 
- Public Member Functions inherited from OpenANN::Transformer
virtual ~Transformer ()
 
virtual TransformerfitPartial (const Eigen::MatrixXd &X)
 Fit transformation according to subset of the training set X. More...
 

Detailed Description

Principal component analysis.

Constructor & Destructor Documentation

OpenANN::PCA::PCA ( int  components,
bool  whiten = true 
)

Create PCA.

Parameters
componentsnumber of dimensions after transformation
whitenoutputs should have variance 1

Member Function Documentation

Eigen::VectorXd OpenANN::PCA::explainedVarianceRatio ( )

Get the ratio of explained variance for each transformed feature.

Returns
explaned variance ratio, must be within [0, 1] and sum up to 1 for all features (including discarded features)
virtual Transformer& OpenANN::PCA::fit ( const Eigen::MatrixXd &  X)
virtual

Fit transformation according to training set X.

Parameters
Xeach row represents an instance
Returns
this for chaining

Implements OpenANN::Transformer.

virtual Eigen::MatrixXd OpenANN::PCA::transform ( const Eigen::MatrixXd &  X)
virtual

Transform the data.

Parameters
Xeach row represents an instance
Returns
transformed data

Implements OpenANN::Transformer.


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