OpenANN
1.1.0
An open source library for artificial neural networks.
Main Page
Classes
Files
List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
OpenANN
PCA.h
Go to the documentation of this file.
1
#ifndef OPENANN_PCA_H_
2
#define OPENANN_PCA_H_
3
4
#include <
OpenANN/Transformer.h
>
5
#include <Eigen/Core>
6
7
namespace
OpenANN
8
{
9
14
class
PCA
:
public
Transformer
15
{
16
int
components;
17
bool
whiten;
18
Eigen::VectorXd mean;
19
Eigen::MatrixXd W;
20
Eigen::VectorXd evr;
21
public
:
27
PCA
(
int
components,
bool
whiten =
true
);
28
29
virtual
Transformer
&
fit
(
const
Eigen::MatrixXd&
X
);
30
virtual
Eigen::MatrixXd
transform
(
const
Eigen::MatrixXd& X);
31
37
Eigen::VectorXd
explainedVarianceRatio
();
38
};
39
40
}
// namespace OpenANN
41
42
#endif // OPENANN_PCA_H_
Generated on Wed Jul 9 2014 08:57:52 for OpenANN by
1.8.4