12#ifndef ROOT_TPrincipal 
   13#define ROOT_TPrincipal 
#define ClassDef(name, id)
 
Using a TBrowser one can browse all ROOT objects.
 
The TNamed class is the base class for all named ROOT classes.
 
Principal Components Analysis (PCA)
 
virtual void MakeMethods(const char *classname="PCA", Option_t *option="")
Generate the file <classname>PCA.cxx which contains the implementation of two methods:
 
virtual void AddRow(const Double_t *x)
Add a data point and update the covariance matrix.
 
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.
 
virtual void Print(Option_t *opt="MSE") const
Print the statistics Options are.
 
const Double_t * GetRow(Int_t row)
Return a row of the user supplied data.
 
TPrincipal()
Empty constructor. Do not use.
 
const TMatrixD * GetCovarianceMatrix() const
 
virtual void Browse(TBrowser *b)
Browse the TPrincipal object in the TBrowser.
 
virtual void MakeHistograms(const char *name="pca", Option_t *option="epsdx")
Make histograms of the result of the analysis.
 
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 ....
 
TMatrixD fCovarianceMatrix
 
virtual ~TPrincipal()
Destructor.
 
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
const TVectorD * GetMeanValues() const
 
const TMatrixD * GetEigenVectors() const
 
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...
 
const TVectorD * GetUserData() const
 
const TVectorD * GetEigenValues() const
 
const TVectorD * GetSigmas() const
 
virtual void Clear(Option_t *option="")
Clear the data in Object.
 
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,...
 
Int_t fNumberOfDataPoints
 
void MakeNormalised()
Normalize the covariance matrix.
 
TList * GetHistograms() const
 
virtual void MakePrincipals()
Perform the principal components analysis.
 
virtual void SumOfSquareResiduals(const Double_t *x, Double_t *s)
Calculates the sum of the square residuals, that is.
 
void Test(Option_t *option="")
Test the PCA, bye calculating the sum square of residuals (see method SumOfSquareResiduals),...
 
TPrincipal & operator=(const TPrincipal &)
Assignment operator.
 
static constexpr double s