Parent Directory
|
Revision Log
import changes from math development branches for subdirectory math. List of changes in detail:
mathcore:
---------
MinimizerOptions:
new class for storing Minimizer option, with static default values that can be
changed by the user
FitConfig:
- use default values from MinimizerOption class
- rename method to create parameter settings from a function
FitUtil.cxx:
improve the derivative calculations used in the effective chi2 and in Fumili and
fix a bug for evaluation of likelihood or chi2 terms.
In EvaluatePdf() work and return the log of the pdf.
FitResult:
- improve the class by adding extra information like, num. of free parameters,
minimizer status, global correlation coefficients, information about fixed
and bound parameters.
- add method for getting fit confidence intervals
- improve print method
DataRange:
add method SetRange to distinguish from AddRange. SetRange deletes the existing
ranges.
ParamsSettings: make few methods const
FCN functions (Chi2FCN, LogLikelihoodFCN, etc..)
move some common methods and data members in base class (FitMethodFunction)
RootFinder: add template Solve() for any callable function.
mathmore:
--------
minimizer classes: fill status information
GSLNLSMinimizer: return error and covariance matrix
minuit2:
-------
Minuit2Minimizer: fill status information
DavidonErrorUpdator: check that delgam or gvg are not zero ( can happen when dg = 0)
FumiliFCNAdapter: work on the log of pdf
minuit:
-------
TLinearMinimizer: add support for robust fitting
TMinuitMinimizer: fill status information and fix a bug in filling the correlation matrix.
fumili:
------
add TFumiliMinimizer:
wrapper class for TFumili using Minimizer interface
// @(#)root/mathcore:$Id$
// Author: L. Moneta Fri Aug 15 2008
/**********************************************************************
* *
* Copyright (c) 2008 LCG ROOT Math Team, CERN/PH-SFT *
* *
* *
**********************************************************************/
#include "Math/MinimizerOptions.h"
#include "RConfigure.h"
namespace ROOT {
namespace Math {
// default minimizer options (static variable)
#ifdef R__HAS_MINUIT2
static std::string gDefaultMinimizer = "Minuit2";
#else
static std::string gDefaultMinimizer = "Minuit";
#endif
static std::string gDefaultMinimAlgo = "Migrad";
static double gDefaultErrorDef = 1.;
static double gDefaultTolerance = 1.E-4;
static int gDefaultMaxCalls = 0; // 0 means leave default values Deaf
static int gDefaultMaxIter = 0;
static int gDefaultStrategy = 1;
static int gDefaultPrintLevel = 0;
void MinimizerOptions::SetDefaultMinimizer(const std::string & type, const std::string & algo = "") {
// set the default minimizer type and algorithm
if (type != "") gDefaultMinimizer = type;
if (algo != "") gDefaultMinimAlgo = algo;
}
void MinimizerOptions::SetDefaultErrorDef(double up) {
gDefaultErrorDef = up;
}
void MinimizerOptions::SetDefaultTolerance(double tol) {
gDefaultTolerance = tol;
}
void MinimizerOptions::SetDefaultMaxFunctionCalls(int maxcall) {
gDefaultMaxCalls = maxcall;
}
void MinimizerOptions::SetDefaultMaxIterations(int maxiter) {
gDefaultMaxIter = maxiter;
}
void MinimizerOptions::SetDefaultStrategy(int stra) {
gDefaultStrategy = stra;
}
void MinimizerOptions::SetDefaultPrintLevel(int level) {
gDefaultPrintLevel = level;
}
const std::string & MinimizerOptions::DefaultMinimizerType() { return gDefaultMinimizer; }
const std::string & MinimizerOptions::DefaultMinimizerAlgo() { return gDefaultMinimAlgo; }
double MinimizerOptions::DefaultErrorDef() { return gDefaultErrorDef; }
double MinimizerOptions::DefaultTolerance() { return gDefaultTolerance; }
int MinimizerOptions::DefaultMaxFunctionCalls() { return gDefaultMaxCalls; }
int MinimizerOptions::DefaultMaxIterations() { return gDefaultMaxIter; }
int MinimizerOptions::DefaultStrategy() { return gDefaultStrategy; }
int MinimizerOptions::DefaultPrintLevel() { return gDefaultPrintLevel; }
} // end namespace Math
} // end namespace ROOT
| Subversion Admin | ViewVC Help |
| Powered by ViewVC 1.0.9 |