Isis Developer Reference
PrincipalComponentAnalysis.h
Go to the documentation of this file.
1 #ifndef PrincipalComponentAnalysis_h
2 #define PrincipalComponentAnalysis_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include <vector>
10 #include "tnt/tnt_array2d.h"
11 #include "MultivariateStatistics.h"
12 #include "IException.h"
13 #include "Constants.h"
14 
15 namespace Isis {
36  public:
37  PrincipalComponentAnalysis(const int n);
38  PrincipalComponentAnalysis(TNT::Array2D<double> transform);
40  void AddData(const double *data, const unsigned int count);
41  void ComputeTransform();
42  TNT::Array2D<double> Transform(TNT::Array2D<double> data);
43  TNT::Array2D<double> Inverse(TNT::Array2D<double> data);
44  TNT::Array2D<double> TransformMatrix() {
45  return p_transform;
46  };
47  int Dimensions() {
48  return p_dimensions;
49  };
50 
51  private:
52  void ComputeInverse();
53  bool p_hasTransform;
54  int p_dimensions;
55 
56  TNT::Array2D<double> p_transform, p_inverse;
57  std::vector<Isis::MultivariateStatistics *> p_statistics;
58  };
59 }
60 
61 #endif
Isis::PrincipalComponentAnalysis::TransformMatrix
TNT::Array2D< double > TransformMatrix()
Definition: PrincipalComponentAnalysis.h:44
Isis::PrincipalComponentAnalysis::Dimensions
int Dimensions()
Definition: PrincipalComponentAnalysis.h:47
Isis::PrincipalComponentAnalysis::PrincipalComponentAnalysis
PrincipalComponentAnalysis(const int n)
Constructs the PrincipalComponentAnalysis object.
Definition: PrincipalComponentAnalysis.cpp:17
Isis::PrincipalComponentAnalysis::AddData
void AddData(const double *data, const unsigned int count)
Definition: PrincipalComponentAnalysis.cpp:48
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
PrincipalComponentAnalysis.h
Isis::MultivariateStatistics
Container of multivariate statistics.
Definition: MultivariateStatistics.h:54
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::PrincipalComponentAnalysis
Principal Component Analysis class.
Definition: PrincipalComponentAnalysis.h:35
MultivariateStatistics.h
Isis::PrincipalComponentAnalysis::Transform
TNT::Array2D< double > Transform(TNT::Array2D< double > data)
Definition: PrincipalComponentAnalysis.cpp:115
Isis::PrincipalComponentAnalysis::Inverse
TNT::Array2D< double > Inverse(TNT::Array2D< double > data)
Definition: PrincipalComponentAnalysis.cpp:126
IException.h
std
Namespace for the standard library.
Isis::E
const double E
Sets some basic constants for use in ISIS programming.
Definition: Constants.h:39
Isis::PrincipalComponentAnalysis::ComputeTransform
void ComputeTransform()
Definition: PrincipalComponentAnalysis.cpp:65
Constants.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::PrincipalComponentAnalysis::~PrincipalComponentAnalysis
~PrincipalComponentAnalysis()
Definition: PrincipalComponentAnalysis.h:39