4#ifndef ROOT_TMultiDimFit
5#define ROOT_TMultiDimFit
118 const char *classname,
unsigned char Byte_t
Byte (8 bits) (unsigned char).
int Int_t
Signed integer 4 bytes (int).
char Char_t
Character 1 byte (char).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
TMatrixT< Double_t > TMatrixD
TVectorT< Double_t > TVectorD
Using a TBrowser one can browse all ROOT objects.
const TVectorD * GetQuantity() const
Double_t GetSumSqAvgQuantity() const
void Print(Option_t *option="ps") const override
Print statistics etc. Options are P Parameters S Statistics C Coefficients R Result of parameterisati...
Int_t GetNCoefficients() const
static TMultiDimFit * Instance()
Double_t GetMinQuantity() const
void SetMaxStudy(Int_t n)
TVectorD fCoefficients
Vector of the final coefficients.
Double_t fPrecision
Relative precision of param.
Double_t GetMaxAngle() const
Byte_t fHistogramMask
Bit pattern of histograms used.
void SetBinVarX(Int_t nbbinvarx)
void SetMaxFunctions(Int_t n)
static TMultiDimFit * fgInstance
Double_t GetTestPrecision() const
TMatrixD fOrthCurvatureMatrix
Model matrix.
Bool_t fShowCorrelation
print correlation matrix
Bool_t fIsUserFunction
Flag for user defined function.
Double_t GetError() const
Int_t fNVariables
Number of independent variables.
Int_t GetSampleSize() const
virtual void MakeNormalized()
Int_t fMaxResidualRow
Row giving max residual.
virtual void MakeHistograms(Option_t *option="A")
Double_t fMinQuantity
Min value of dependent quantity.
Double_t fSumSqQuantity
SumSquare of dependent quantity.
TVectorD fMaxVariables
max value of independent variables
Double_t GetPrecision() const
const TVectorD * GetVariables() const
Int_t GetResidualMinRow() const
const TVectorD * GetMeanVariables() const
void SetMaxTerms(Int_t terms)
Double_t GetSumSqQuantity() const
Int_t fSampleSize
Size of training sample.
Double_t GetResidualSumSq() const
Double_t fSumSqAvgQuantity
Sum of squares away from mean.
Int_t fMaxTerms
Max terms expected in final expr.
virtual Double_t EvalControl(const Int_t *powers) const
Int_t * fPowers
[fMaxFuncNV] where fMaxFuncNV = fMaxFunctions*fNVariables
Double_t GetPowerLimit() const
virtual Double_t Eval(const Double_t *x, const Double_t *coeff=nullptr) const
Int_t * fMaxPowers
[fNVariables] maximum powers
Int_t GetNVariables() const
Int_t fMaxStudy
max functions to study
TVectorD fTestQuantity
Test sample, dependent quantity.
TVectorD fTestSqError
Test sample, Error in quantity.
void Draw(Option_t *="d") override
Default Draw method for all objects.
Int_t fMaxFunctions
max number of functions
Int_t fBinVarY
Number of bin in dependent variables.
virtual void AddRow(const Double_t *x, Double_t D, Double_t E=0)
const TVectorD * GetSqError() const
virtual void MakeMethod(const Char_t *className="MDF", Option_t *option="")
const TVectorD * GetMaxVariables() const
Double_t fTestError
Error from test.
Double_t fMinResidual
Min residual value.
void SetPowerLimit(Double_t limit=1e-3)
Set the user parameter for the function selection. The bigger the limit, the more functions are used....
const TMatrixD * GetFunctions() const
Int_t * GetMaxPowers() const
const TVectorD * GetMinVariables() const
TVectorD fSqError
Training sample, error in quantity.
Int_t GetTestSampleSize() const
Int_t GetResidualMaxRow() const
TVectorD fQuantity
Training sample, dependent quantity.
Double_t GetMinAngle() const
TVectorD fTestVariables
Test sample, independent variables.
TVectorD fOrthCoefficients
The model coefficients.
Int_t fTestSampleSize
Size of test sample.
TVectorD fResiduals
Vector of the final residuals.
const Int_t * GetPowers() const
virtual Bool_t TestFunction(Double_t squareResidual, Double_t dResidur)
PRIVATE METHOD: Test whether the currently considered function contributes to the fit....
virtual void FindParameterization(Option_t *option="")
TVectorD fVariables
Training sample, independent variables.
Double_t fCorrelationCoeff
Multi Correlation coefficient.
void SetMaxPowers(const Int_t *powers)
Set the maximum power to be considered in the fit for each variable. See also class description.
Int_t * fMaxPowersFinal
[fNVariables] maximum powers from fit;
Int_t fMinResidualRow
Row giving min residual.
Int_t GetMaxTerms() const
virtual void SetPowers(const Int_t *powers, Int_t terms)
Define a user function. The input array must be of the form (p11, ..., p1N, ... ,pL1,...
Double_t fMaxQuantity
Max value of dependent quantity.
virtual void MakeRealCode(const char *filename, const char *classname, Option_t *option="")
PRIVATE METHOD: This is the method that actually generates the code for the evaluation the parameteri...
Double_t fRMS
Root mean square of fit.
virtual void Fit(Option_t *option="")
TVirtualFitter * fFitter
! Fit object (MINUIT)
TMatrixD fFunctions
Functions evaluated over sample.
Double_t GetResidualMin() const
Int_t fParameterisationCode
Exit code of parameterisation.
const TVectorD * GetTestVariables() const
Double_t fMaxAngle
Max angle for accepting new function.
Int_t fNCoefficients
Dimension of model coefficients.
virtual TList * GetHistograms() const
Double_t fTestCorrelationCoeff
Multi Correlation coefficient.
Int_t GetMaxStudy() const
Double_t GetMeanQuantity() const
Double_t fMinAngle
Min angle for accepting new function.
const TMatrixD * GetCorrelationMatrix() const
void SetMinRelativeError(Double_t error)
Set the acceptable relative error for when sum of square residuals is considered minimized....
Double_t fSumSqResidual
Sum of Square residuals.
Double_t GetResidualMax() const
TVectorD fMeanVariables
mean value of independent variables
void SetBinVarY(Int_t nbbinvary)
virtual void MakeCoefficients()
virtual void MakeCandidates()
Double_t GetMinRelativeError() const
void SetMaxAngle(Double_t angle=0)
Set the max angle (in degrees) between the initial data vector to be fitted, and the new candidate fu...
virtual void MakeCode(const char *functionName="MDF", Option_t *option="")
virtual Double_t EvalError(const Double_t *x, const Double_t *coeff=nullptr) const
Double_t fTestPrecision
Relative precision of test.
const TVectorD * GetTestSqError() const
virtual void MakeParameterization()
TMatrixD fCorrelationMatrix
Correlation matrix.
virtual Double_t EvalFactor(Int_t p, Double_t x) const
Int_t * GetPowerIndex() const
Int_t * fPowerIndex
[fMaxTerms] Index of accepted powers
TMatrixD fOrthFunctions
As above, but orthogonalised.
virtual Double_t MakeChi2(const Double_t *coeff=nullptr)
void Clear(Option_t *option="") override
EMDFPolyType fPolyType
Type of polynomials to use.
void Browse(TBrowser *b) override
Browse object. May be overridden for another default action.
virtual Bool_t Select(const Int_t *iv)
Selection method. User can override this method for specialized selection of acceptable functions in ...
Int_t GetMaxFunctions() const
TList * fHistograms
List of histograms.
Double_t GetTestError() const
virtual void AddTestRow(const Double_t *x, Double_t D, Double_t E=0)
Double_t fChi2
Chi square of fit.
Double_t fMaxResidual
Max residual value.
Double_t fError
Error from parametrization.
Int_t fBinVarX
Number of bin in independent variables.
virtual Double_t MakeGramSchmidt(Int_t function)
Int_t * GetFunctionCodes() const
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
const TVectorD * GetTestQuantity() const
void SetMinAngle(Double_t angle=1)
Set the min angle (in degrees) between a new candidate function and the subspace spanned by the previ...
TVectorD fMinVariables
min value of independent variables
TMultiDimFit(Int_t dimension, EMDFPolyType type=kMonomials, Option_t *option="")
TVectorD fOrthFunctionNorms
Norm of the evaluated functions.
const TVectorD * GetCoefficientsRMS() const
Double_t fMeanQuantity
Mean of dependent quantity.
const TVectorD * GetCoefficients() const
TVectorD fCoefficientsRMS
Vector of RMS of coefficients.
Double_t fPowerLimit
Control parameter.
Int_t GetPolyType() const
virtual void MakeCoefficientErrors()
Int_t fMaxFuncNV
fMaxFunctions*fNVariables
virtual void MakeCorrelation()
Double_t GetMaxQuantity() const
Double_t fMinRelativeError
Min relative error accepted.
Int_t * fFunctionCodes
[fMaxFunctions] acceptance code
Abstract Base Class for Fitting.