#include <shark/Algorithms/Trainers/PCA.h>
#include <shark/Statistics/Distributions/MultiVariateNormalDistribution.h>
#include <boost/foreach.hpp>
Go to the source code of this file.
Functions | |
UnlabeledData< RealVector > | createData () |
The test distribution is just a multivariate Gaussian. More... | |
int | main () |
Variables | |
double | principalComponents [3][3] |
std::size_t | numberOfExamples = 30000 |
UnlabeledData<RealVector> createData | ( | ) |
The test distribution is just a multivariate Gaussian.
Definition at line 28 of file PCA.cpp.
References shark::covariance(), shark::createDataFromRange(), shark::mean(), numberOfExamples, principalComponents, shark::blas::prod(), and shark::blas::trans().
Referenced by main().
int main | ( | ) |
Definition at line 62 of file PCA.cpp.
References createData(), shark::PCA::eigenvalues(), shark::LinearModel< InputType >::matrix(), shark::blas::row(), shark::PCA::setWhitening(), and shark::PCA::train().
std::size_t numberOfExamples = 30000 |
Definition at line 25 of file PCA.cpp.
Referenced by createData().
double principalComponents[3][3] |
In this test, we will use PCA to calculate the eigenvectors of a scatter matrix and do a reduction of the subspace to the space spanned by the two eigenvectors with the biggest eigenvalues. the principal components of our multivariate data distribution we will use them later for checking
Definition at line 18 of file PCA.cpp.
Referenced by createData().