52 const std::vector<Interval*>& ranges,
70 "If > 0: new points are generated according to Gauss around best value and with \"Sigma\" in units of interval length" );
87 Log() << kHEADER <<
"<MCFitter> Sampling, please be patient ..." <<
Endl;
91 Log() << kFATAL <<
"<Run> Mismatch in number of parameters: "
98 std::vector<Double_t> parameters;
99 std::vector<Double_t> bestParameters;
104 std::vector<TMVA::GeneticRange*> rndRanges;
107 std::vector< TMVA::Interval* >::const_iterator rIt;
111 val = rndRanges.back()->Random();
112 parameters.push_back( val );
113 bestParameters.push_back( val );
116 std::vector<Double_t>::iterator parIt;
117 std::vector<Double_t>::iterator parBestIt;
128 parIt = parameters.begin();
130 parBestIt = bestParameters.begin();
131 for (std::vector<TMVA::GeneticRange*>::iterator rndIt = rndRanges.begin(); rndIt<rndRanges.end(); ++rndIt) {
132 (*parIt) = (*rndIt)->Random(
kTRUE, (*parBestIt),
fSigma );
138 for (std::vector<TMVA::GeneticRange*>::iterator rndIt = rndRanges.begin(); rndIt<rndRanges.end(); ++rndIt) {
139 (*parIt) = (*rndIt)->Random();
148 if (estimator < bestFit || sample==0) {
150 bestParameters.swap( parameters );
156 pars.swap( bestParameters );
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
OptionBase * DeclareOptionRef(T &ref, const TString &name, const TString &desc="")
virtual void ParseOptions()
options parser
Double_t EstimatorFunction(std::vector< Double_t > ¶meters)
estimator function interface for fitting
FitterBase(IFitterTarget &target, const TString &name, const std::vector< TMVA::Interval * > ranges, const TString &theOption)
constructor
const char * GetName() const override
Returns name of object.
Double_t Run()
estimator function interface for fitting
const std::vector< TMVA::Interval * > fRanges
Range definition for genetic algorithm.
Interface for a fitter 'target'.
UInt_t fSeed
Seed for the random generator (0 takes random seeds).
void SetParameters(Int_t cycles)
set MC fitter configuration parameters
void DeclareOptions() override
Declare MCFitter options.
Double_t fSigma
new samples are generated randomly with a gaussian probability with fSigma around the current best va...
MCFitter(IFitterTarget &target, const TString &name, const std::vector< TMVA::Interval * > &ranges, const TString &theOption)
constructor
Int_t fSamples
number of MC samples
Timing information for training and evaluation of MVA methods.
TString GetElapsedTime(Bool_t Scientific=kTRUE)
returns pretty string with elapsed time
void DrawProgressBar(Int_t, const TString &comment="")
draws progress bar in color or B&W caution:
Random number generator class based on M.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
create variable transformations
MsgLogger & Endl(MsgLogger &ml)