Isis 3 Developer Reference
PrincipalComponentAnalysis.h
Go to the documentation of this file.
1 #ifndef PrincipalComponentAnalysis_h
2 #define PrincipalComponentAnalysis_h
3 
25 #include <vector>
26 #include "tnt/tnt_array2d.h"
27 #include "MultivariateStatistics.h"
28 #include "IException.h"
29 #include "Constants.h"
30 
31 namespace Isis {
52  public:
53  PrincipalComponentAnalysis(const int n);
54  PrincipalComponentAnalysis(TNT::Array2D<double> transform);
56  void AddData(const double *data, const unsigned int count);
57  void ComputeTransform();
58  TNT::Array2D<double> Transform(TNT::Array2D<double> data);
59  TNT::Array2D<double> Inverse(TNT::Array2D<double> data);
60  TNT::Array2D<double> TransformMatrix() {
61  return p_transform;
62  };
63  int Dimensions() {
64  return p_dimensions;
65  };
66 
67  private:
68  void ComputeInverse();
69  bool p_hasTransform;
70  int p_dimensions;
71 
72  TNT::Array2D<double> p_transform, p_inverse;
73  std::vector<Isis::MultivariateStatistics *> p_statistics;
74  };
75 }
76 
77 #endif
int Dimensions()
Definition: PrincipalComponentAnalysis.h:63
~PrincipalComponentAnalysis()
Definition: PrincipalComponentAnalysis.h:55
void ComputeTransform()
Definition: PrincipalComponentAnalysis.cpp:81
Principal Component Analysis class.
Definition: PrincipalComponentAnalysis.h:51
TNT::Array2D< double > TransformMatrix()
Definition: PrincipalComponentAnalysis.h:60
TNT::Array2D< double > Transform(TNT::Array2D< double > data)
Definition: PrincipalComponentAnalysis.cpp:131
TNT::Array2D< double > Inverse(TNT::Array2D< double > data)
Definition: PrincipalComponentAnalysis.cpp:142
PrincipalComponentAnalysis(const int n)
Constructs the PrincipalComponentAnalysis object.
Definition: PrincipalComponentAnalysis.cpp:33
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void AddData(const double *data, const unsigned int count)
Definition: PrincipalComponentAnalysis.cpp:64