52 const std::vector<TMVA::Interval*>& ranges,
75 "Saves the best n results from each generation. They are included in the last cycle" );
77 "Saves the best n results from each cycle. They are included in the last cycle. The value should be set to at least 1.0" );
80 "Trim the population to PopSize after assessing the fitness of each individual" );
109 Log() << kHEADER <<
"<GeneticFitter> Optimisation, please be patient "
110 <<
"... (inaccurate progress timing for GA)" <<
Endl;
134 if ( pars.size() ==
fRanges.size() ){
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
OptionBase * DeclareOptionRef(T &ref, const TString &name, const TString &desc="")
virtual void ParseOptions()
options parser
FitterBase(IFitterTarget &target, const TString &name, const std::vector< TMVA::Interval * > ranges, const TString &theOption)
constructor
IFitterTarget & GetFitterTarget() const
const char * GetName() const
Returns name of object.
MsgLogger & Log() const
message logger
Double_t Run()
estimator function interface for fitting
const std::vector< TMVA::Interval * > fRanges
Base definition for genetic algorithm.
virtual Double_t SpreadControl(Int_t steps, Int_t ofSteps, Double_t factor)
this function provides the ability to change the stepSize of a mutation according to the success of t...
virtual Bool_t HasConverged(Int_t steps=10, Double_t ratio=0.1)
gives back true if the last "steps" steps have lead to an improvement of the "fitness" of the "indivi...
GeneticPopulation & GetGeneticPopulation()
void Init()
calls evolution, but if it is not the first time.
virtual Double_t CalculateFitness()
starts the evaluation of the fitness of all different individuals of the population.
Fitter using a Genetic Algorithm.
void DeclareOptions()
declare GA options
Double_t fSC_factor
... with fSC_factor; if there were less improvements: divide by that factor; if there were exactly fS...
Double_t fConvCrit
improvements bigger than fConvCrit are counted as "improvement"
Int_t fSC_rate
... fSC_rate improvements, than multiply the sigma of the gaussian which defines how the random numbe...
Int_t fNsteps
convergence criteria: if no improvements > fConvCrit was achieved within the last fNsteps: cycle has ...
Int_t fCycles
number of (nearly) independent calculation cycles
void SetParameters(Int_t cycles, Int_t nsteps, Int_t popSize, Int_t SC_steps, Int_t SC_rate, Double_t SC_factor, Double_t convCrit)
set GA configuration parameters
Int_t fSC_steps
regulates how strong the mutations for the coordinates are: if within fSC_steps there were more than....
Int_t fSaveBestFromGeneration
store the best individuals from one generation (these are included as "hints" in the last cycle of GA...
Bool_t fTrim
take care, that the number of individuals is less fPopSize (trimming is done after the fitness of the...
UInt_t fSeed
Seed for the random generator (0 takes random seeds)
Int_t fSaveBestFromCycle
store the best individuals from one cycle (these are included as "hints" in the last cycle of GA calc...
Int_t fPopSize
number of individuals to start with
GeneticFitter(IFitterTarget &target, const TString &name, const std::vector< TMVA::Interval * > &ranges, const TString &theOption)
constructor
std::vector< Double_t > & GetFactors()
Double_t GetFitness() const
void Sort()
sort the genepool according to the fitness of the individuals
void TrimPopulation()
trim the population to the predefined size
GeneticGenes * GetGenes(Int_t index)
gives back the "Genes" of the population with the given index.
void GiveHint(std::vector< Double_t > &hint, Double_t fitness=0)
add an individual (a set of variables) to the population if there is a set of variables which is know...
void AddPopulation(GeneticPopulation *strangers)
add another population (strangers) to the one of this GeneticPopulation
Interface for a fitter 'target'.
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:
MsgLogger & Endl(MsgLogger &ml)