MLPACK  1.0.4
pca.hpp
Go to the documentation of this file.
00001 
00023 #ifndef __MLPACK_METHODS_PCA_PCA_HPP
00024 #define __MLPACK_METHODS_PCA_PCA_HPP
00025 
00026 #include <mlpack/core.hpp>
00027 
00028 namespace mlpack {
00029 namespace pca {
00030 
00031 class PCA
00032 {
00033  public:
00034   PCA(const bool scaleData = false);
00035 
00044   void Apply(const arma::mat& data, arma::mat& transformedData, arma::vec&
00045              eigVal, arma::mat& coeff) const;
00046 
00054   void Apply(const arma::mat& data, arma::mat& transformedData,
00055              arma::vec& eigVal) const;
00056 
00067   void Apply(arma::mat& data, const size_t newDimension) const;
00068 
00072   ~PCA();
00073 
00076   bool ScaleData() const { return scaleData; }
00079   bool& ScaleData() { return scaleData; }
00080 
00081  private:
00082   bool scaleData;
00083 }; // class PCA
00084 
00085 }; // namespace pca
00086 }; // namespace mlpack
00087 
00088 #endif