12#ifndef ROOT_TPrincipal
13#define ROOT_TPrincipal
#define ClassDefOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
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.
Double_t fTrace
Trace of covarience matrix.
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
void Clear(Option_t *option="") override
Clear the data in Object.
virtual void MakeHistograms(const char *name="pca", Option_t *option="epsdx")
Make histograms of the result of the analysis.
void Print(Option_t *opt="MSE") const override
Print the statistics Options are.
TVectorD fUserData
Vector of original data points.
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
Covariance matrix.
Int_t fNumberOfVariables
Number of variables.
TVectorD fSigmas
vector of sigmas
TVectorD fOffDiagonal
Elements of the tridiagonal.
TVectorD fEigenValues
Eigenvalue vector of trans.
const TVectorD * GetMeanValues() const
TVectorD fMeanValues
Mean value over all data points.
TList * fHistograms
List of histograms.
const TMatrixD * GetEigenVectors() const
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
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...
Bool_t fStoreData
Should we store input data?
TMatrixD fEigenVectors
Eigenvector matrix of trans.
const TVectorD * GetUserData() const
~TPrincipal() override
Destructor.
const TVectorD * GetEigenValues() const
const TVectorD * GetSigmas() const
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,...
void Browse(TBrowser *b) override
Browse the TPrincipal object in the TBrowser.
Int_t fNumberOfDataPoints
Number of data points.
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),...
Bool_t fIsNormalised
Normalize matrix?
TPrincipal & operator=(const TPrincipal &)
Assignment operator.