12 #ifndef ROOT_TLinearFitter 13 #define ROOT_TLinearFitter 147 #include "TFormula.h" virtual void GetAtbVector(TVectorD &v)
Get the Atb vector - a vector, used for internal computations.
virtual void GetErrors(TVectorD &vpar)
Returns parameter errors.
virtual void StoreData(Bool_t store)
void RDraw(Int_t *subdat, Int_t *indsubdat)
Draws ngroup nonoverlapping subdatasets out of a dataset of size n such that the selected case number...
virtual void FixParameter(Int_t ipar)
Fixes paramter #ipar at its current value.
virtual Int_t GetStats(Double_t &, Double_t &, Double_t &, Int_t &, Int_t &) const
The Linear Fitter - For fitting functions that are LINEAR IN PARAMETERS.
virtual void AddTempMatrices()
TObjArray fFunctions
map of basis functions and formula
virtual void GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t *x, Double_t *ci, Double_t cl=0.95)
Computes point-by-point confidence intervals for the fitted function Parameters: n - number of points...
virtual Int_t GetNpoints()
virtual void ClearPoints()
To be used when different sets of points are fitted with the same formula.
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs)
To use in TGraph::Fit and TH1::Fit().
Int_t Graph2DLinearFitter(Double_t h)
Minimisation function for a TGraph2D.
static std::map< TString, TFormula * > fgFormulaMap
virtual void GetDesignMatrix(TMatrixD &matr)
Returns the internal design matrix.
Int_t Partition(Int_t nmini, Int_t *indsubdat)
divides the elements into approximately equal subgroups number of elements in each subgroup is stored...
virtual Double_t * GetCovarianceMatrix() const
Returns covariance matrix.
virtual const char * GetParName(Int_t ipar) const
Returns name of parameter #ipar.
TFormula * fInputFunction
virtual Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const
virtual Bool_t IsFixed(Int_t ipar) const
virtual Int_t GetErrors(Int_t, Double_t &, Double_t &, Double_t &, Double_t &) const
#define ClassDef(name, id)
virtual void PrintResults(Int_t level, Double_t amin=0) const
Level = 3 (to be consistent with minuit) prints parameters and parameter errors.
virtual void GetFitSample(TBits &bits)
For robust lts fitting, returns the sample, on which the best fit was based.
Double_t CStep(Int_t step, Int_t h, Double_t *residuals, Int_t *index, Int_t *subdat, Int_t start, Int_t end)
The CStep procedure, as described in the article.
virtual void Clear(Option_t *option="")
Clears everything. Used in TH1::Fit and TGraph::Fit().
virtual Int_t GetNumberFreeParameters() const
virtual void Chisquare()
Calculates the chisquare.
void CreateSubset(Int_t ntotal, Int_t h, Int_t *index)
Creates a p-subset to start ntotal - total number of points from which the subset is chosen...
virtual Double_t GetParTValue(Int_t ipar)
Returns the t-value for parameter #ipar.
void AddToDesign(Double_t *x, Double_t y, Double_t e)
Add a point to the AtA matrix and to the Atb vector.
Int_t HistLinearFitter()
Minimization function for H1s using a Chisquare method.
virtual Double_t GetParameter(Int_t ipar) const
virtual Double_t GetParSignificance(Int_t ipar)
Returns the significance of parameter #ipar.
Int_t MultiGraphLinearFitter(Double_t h)
Minimisation function for a TMultiGraph.
virtual Int_t EvalRobust(Double_t h=-1)
Finds the parameters of the fitted function in case data contains outliers.
Collection abstract base class.
virtual Double_t GetChisquare()
Get the Chisquare.
Int_t GraphLinearFitter(Double_t h)
Used in TGraph::Fit().
virtual void ReleaseParameter(Int_t ipar)
Releases parameter #ipar.
TLinearFitter()
default c-tor, input data is stored If you don't want to store the input data, run the function Store...
TMatrixD fX
temporary variable used for num.stability
virtual Double_t Chisquare(Int_t, Double_t *) const
virtual void SetBasisFunctions(TObjArray *functions)
set the basis functions in case the fitting function is not set directly The TLinearFitter will manag...
virtual void SetFitMethod(const char *)
virtual Int_t Eval()
Perform the fit and evaluate the parameters Returns 0 if the fit is ok, 1 if there are errors...
TMatrixDSym fDesignTemp2
temporary matrix, used for num.stability
virtual void Add(TLinearFitter *tlf)
Add another linear fitter to this linear fitter.
virtual Double_t GetY2() const
virtual ~TLinearFitter()
Linear fitter cleanup.
TLinearFitter & operator=(const TLinearFitter &tlf)
Assignment operator.
virtual void GetParameters(TVectorD &vpar)
Returns parameter values.
virtual Double_t GetParError(Int_t ipar) const
Returns the error of parameter #ipar.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void AssignData(Int_t npoints, Int_t xncols, Double_t *x, Double_t *y, Double_t *e=0)
This function is to use when you already have all the data in arrays and don't want to copy them into...
virtual void SetFormula(const char *formula)
Additive parts should be separated by "++".
virtual void SetDim(Int_t n)
set the number of dimensions
void ComputeTValues()
Computes parameters' t-values and significance.
Abstract Base Class for Fitting.
Mother of all ROOT objects.
virtual Int_t SetParameter(Int_t, const char *, Double_t, Double_t, Double_t, Double_t)
virtual Bool_t UpdateMatrix()
Update the design matrix after the formula has been changed.
virtual Double_t GetSumLog(Int_t)
TVectorD fAtbTemp2
temporary vector, used for num.stability
virtual Int_t Merge(TCollection *list)
Merge objects in list.
virtual Int_t GetNumberTotalParameters() const
virtual void AddPoint(Double_t *x, Double_t y, Double_t e=1)
Adds 1 point to the fitter.