12 #ifndef ROOT_TPrincipal 13 #define ROOT_TPrincipal Principal Components Analysis (PCA)
virtual void Browse(TBrowser *b)
Browse the TPrincipal object in the TBrowser.
virtual ~TPrincipal()
Destructor.
void MakeRealCode(const char *filename, const char *prefix, Option_t *option="")
This is the method that actually generates the code for the transformations to and from feature space...
virtual void Print(Option_t *opt="MSE") const
Print the statistics Options are.
virtual void P2X(const Double_t *p, Double_t *x, Int_t nTest)
Calculate x as a function of nTest of the most significant principal components p, and return it in x.
virtual void SumOfSquareResiduals(const Double_t *x, Double_t *s)
Calculates the sum of the square residuals, that is.
void MakeNormalised()
Normalize the covariance matrix.
void Test(Option_t *option="")
Test the PCA, bye calculating the sum square of residuals (see method SumOfSquareResiduals), and display the histogram.
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
virtual void MakeMethods(const char *classname="PCA", Option_t *option="")
Generate the file <classname>PCA.cxx which contains the implementation of two methods: void <classnam...
virtual void MakeHistograms(const char *name="pca", Option_t *option="epsdx")
Make histograms of the result of the analysis.
virtual void X2P(const Double_t *x, Double_t *p)
Calculate the principal components from the original data vector x, and return it in p...
Using a TBrowser one can browse all ROOT objects.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
virtual void AddRow(const Double_t *x)
Add a data point and update the covariance matrix.
const TMatrixD * GetCovarianceMatrix() const
virtual void MakePrincipals()
Perform the principal components analysis.
Int_t fNumberOfDataPoints
const TVectorD * GetSigmas() const
virtual void Clear(Option_t *option="")
Clear the data in Object.
const TVectorD * GetMeanValues() const
const Double_t * GetRow(Int_t row)
Return a row of the user supplied data.
TPrincipal & operator=(const TPrincipal &)
Assignment operator.
static constexpr double s
TList * GetHistograms() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
const TMatrixD * GetEigenVectors() const
virtual void MakeCode(const char *filename="pca", Option_t *option="")
Generates the file <filename>, with .C appended if it does argument doesn't end in ...
const TVectorD * GetUserData() const
const TVectorD * GetEigenValues() const
TMatrixD fCovarianceMatrix
TPrincipal()
Empty constructor. Do not use.