Isis Developer Reference
PrincipalComponentAnalysis.h
Go to the documentation of this file.
1#ifndef PrincipalComponentAnalysis_h
2#define PrincipalComponentAnalysis_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include <vector>
10#include "tnt/tnt_array2d.h"
12#include "IException.h"
13#include "Constants.h"
14
15namespace 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
Principal Component Analysis class.
Definition PrincipalComponentAnalysis.h:35
void ComputeTransform()
Definition PrincipalComponentAnalysis.cpp:65
int Dimensions()
Definition PrincipalComponentAnalysis.h:47
PrincipalComponentAnalysis(const int n)
Constructs the PrincipalComponentAnalysis object.
Definition PrincipalComponentAnalysis.cpp:17
void AddData(const double *data, const unsigned int count)
Definition PrincipalComponentAnalysis.cpp:48
TNT::Array2D< double > TransformMatrix()
Definition PrincipalComponentAnalysis.h:44
TNT::Array2D< double > Inverse(TNT::Array2D< double > data)
Definition PrincipalComponentAnalysis.cpp:126
TNT::Array2D< double > Transform(TNT::Array2D< double > data)
Definition PrincipalComponentAnalysis.cpp:115
~PrincipalComponentAnalysis()
Definition PrincipalComponentAnalysis.h:39
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16