49 std::vector<TMVA::Interval*>& ranges,
74 DeclareOptionRef(fErrorLevel = 1,
"ErrorLevel",
"TMinuit: error level: 0.5=logL fit, 1=chi-squared fit" );
75 DeclareOptionRef(fPrintLevel = -1,
"PrintLevel",
"TMinuit: output level: -1=least, 0, +1=all garbage" );
76 DeclareOptionRef(fFitStrategy = 2,
"FitStrategy",
"TMinuit: fit strategy: 2=best" );
77 DeclareOptionRef(fPrintWarnings =
kFALSE,
"PrintWarnings",
"TMinuit: suppress warnings" );
78 DeclareOptionRef(fUseImprove =
kTRUE,
"UseImprove",
"TMinuit: use IMPROVE" );
79 DeclareOptionRef(fUseMinos =
kTRUE,
"UseMinos",
"TMinuit: use MINOS" );
80 DeclareOptionRef(fBatch =
kFALSE,
"SetBatch",
"TMinuit: use batch mode" );
81 DeclareOptionRef(fMaxCalls = 1000,
"MaxCalls",
"TMinuit: approximate maximum number of function calls" );
82 DeclareOptionRef(fTolerance = 0.1,
"Tolerance",
"TMinuit: tolerance to the function value at the minimum" );
93 if (!fBatch) Log() << kINFO <<
"<MinuitFitter> Init " <<
Endl;
106 args[0] = fPrintLevel;
107 fMinWrap->ExecuteCommand(
"SET PRINTOUT", args, 1 );
109 if (fBatch) fMinWrap->ExecuteCommand(
"SET BAT", args, 0 );
115 args[0] = fErrorLevel;
116 fMinWrap->ExecuteCommand(
"SET ERR", args, 1 );
119 if (!fPrintWarnings) fMinWrap->ExecuteCommand(
"SET NOWARNINGS", args, 0 );
122 args[0] = fFitStrategy;
123 fMinWrap->ExecuteCommand(
"SET STRATEGY", args, 1 );
135 if ( !fBatch ) Log() << kINFO <<
"<MinuitFitter> Fitting, please be patient ... " <<
Endl;
138 if ((
Int_t)pars.size() != GetNpars())
139 Log() << kFATAL <<
"<Run> Mismatch in number of parameters: (a)"
140 << GetNpars() <<
" != " << pars.size() <<
Endl;
144 if (!fBatch) timer =
new Timer();
147 for (
Int_t ipar=0; ipar<fNpars; ipar++) {
149 pars[ipar], fRanges[ipar]->GetWidth()/100.0,
150 fRanges[ipar]->GetMin(), fRanges[ipar]->GetMax() );
151 if (fRanges[ipar]->GetWidth() == 0.0) fMinWrap->FixParameter( ipar );
158 args[1] = fTolerance;
161 fMinWrap->ExecuteCommand(
"MIGrad", args, 2 );
164 if (fUseImprove) fMinWrap->ExecuteCommand(
"IMProve", args, 0 );
169 fMinWrap->ExecuteCommand(
"MINOs", args, 1 );
178 fMinWrap->GetStats( chi2, edm, errdef, nvpar, nparx );
181 if (GetNpars() != nparx) {
182 Log() << kFATAL <<
"<Run> Mismatch in number of parameters: "
183 << GetNpars() <<
" != " << nparx <<
Endl;
187 for (
Int_t ipar=0; ipar<GetNpars(); ipar++) {
188 Double_t errp, errm, errsym, globcor, currVal, currErr;
189 fMinWrap->GetParameter( ipar, currVal, currErr );
190 pars[ipar] = currVal;
191 fMinWrap->GetErrors( ipar, errp, errm, errsym, globcor );
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 Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
virtual void ParseOptions()
options parser
Base class for TMVA fitters.
Double_t Run()
estimator function interface for fitting
Interface for a fitter 'target'.
void Init()
minuit-specific settings
virtual ~MinuitFitter()
destructor
Double_t EstimatorFunction(std::vector< Double_t > &pars)
performs the fit by calling Run(pars)
MinuitFitter(IFitterTarget &target, const TString &name, std::vector< TMVA::Interval * > &ranges, const TString &theOption)
constructor
void DeclareOptions()
declare SA options
Timing information for training and evaluation of MVA methods.
TString GetElapsedTime(Bool_t Scientific=kTRUE)
returns pretty string with elapsed time
virtual void Clear(Option_t *="")
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
create variable transformations
MsgLogger & Endl(MsgLogger &ml)