ROOT
6.06/09
Reference Guide
|
Definition at line 56 of file GeneticAlgorithm.h.
Public Member Functions | |
GeneticAlgorithm (IFitterTarget &target, Int_t populationSize, const std::vector< TMVA::Interval * > &ranges, UInt_t seed=0) | |
virtual | ~GeneticAlgorithm () |
void | Init () |
calls evolution, but if it is not the first time. More... | |
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 "individuals" of at least "improvement" More... | |
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 the last generations. More... | |
virtual Double_t | NewFitness (Double_t oldValue, Double_t newValue) |
if the "fitnessFunction" is called multiple times for one set of factors (because i.e. More... | |
virtual Double_t | CalculateFitness () |
starts the evaluation of the fitness of all different individuals of the population. More... | |
virtual void | Evolution () |
this function is called from "init" and controls the evolution of the individuals. More... | |
GeneticPopulation & | GetGeneticPopulation () |
Double_t | GetSpread () const |
void | SetSpread (Double_t s) |
void | SetMakeCopies (Bool_t s) |
Bool_t | GetMakeCopies () |
Public Attributes | |
Int_t | fConvCounter |
Protected Member Functions | |
MsgLogger & | Log () const |
Protected Attributes | |
IFitterTarget & | fFitterTarget |
Double_t | fConvValue |
std::deque< Int_t > | fSuccessList |
Double_t | fLastResult |
Double_t | fSpread |
Bool_t | fMirror |
Bool_t | fFirstTime |
Bool_t | fMakeCopies |
Int_t | fPopulationSize |
const std::vector< TMVA::Interval * > & | fRanges |
GeneticPopulation | fPopulation |
Double_t | fBestFitness |
MsgLogger * | fLogger |
#include <TMVA/GeneticAlgorithm.h>
TMVA::GeneticAlgorithm::GeneticAlgorithm | ( | IFitterTarget & | target, |
Int_t | populationSize, | ||
const std::vector< TMVA::Interval * > & | ranges, | ||
UInt_t | seed = 0 |
||
) |
|
virtual |
Definition at line 80 of file GeneticAlgorithm.cxx.
|
virtual |
starts the evaluation of the fitness of all different individuals of the population.
this function calls implicitly (many times) the "fitnessFunction" which has been overridden by the user.
Definition at line 127 of file GeneticAlgorithm.cxx.
Referenced by ROOT::Math::GeneticMinimizer::Minimize(), and TMVA::GeneticFitter::Run().
|
virtual |
this function is called from "init" and controls the evolution of the individuals.
the function can be overridden to change the parameters for mutation rate sexual reproduction and so on.
Definition at line 181 of file GeneticAlgorithm.cxx.
|
inline |
Definition at line 73 of file GeneticAlgorithm.h.
Referenced by ROOT::Math::GeneticMinimizer::Minimize(), and TMVA::GeneticFitter::Run().
|
inline |
Definition at line 79 of file GeneticAlgorithm.h.
|
inline |
Definition at line 75 of file GeneticAlgorithm.h.
|
virtual |
gives back true if the last "steps" steps have lead to an improvement of the "fitness" of the "individuals" of at least "improvement"
this gives a simple measure of if the fitness of the individuals is converging and no major improvement is to be expected soon.
Definition at line 251 of file GeneticAlgorithm.cxx.
Referenced by ROOT::Math::GeneticMinimizer::Minimize(), and TMVA::GeneticFitter::Run().
calls evolution, but if it is not the first time.
If it's the first time, the random population created by the constructor is still not evaluated, .. therefore we wait for the second time init is called.
Definition at line 93 of file GeneticAlgorithm.cxx.
Referenced by ROOT::Math::GeneticMinimizer::Minimize(), and TMVA::GeneticFitter::Run().
|
inlineprotected |
Definition at line 108 of file GeneticAlgorithm.h.
if the "fitnessFunction" is called multiple times for one set of factors (because i.e.
each event of a TTree has to be assessed with each set of Factors proposed by the Genetic Algorithm) the value of the current calculation has to be added(? or else) to the value obtained up to now. example: some chi-square is calculated for every event, after every event the new chi-square (newValue) has to be simply added to the oldValue.
this function has to be overridden eventually it might contain only the following return statement. return oldValue + newValue;
Definition at line 115 of file GeneticAlgorithm.cxx.
Definition at line 78 of file GeneticAlgorithm.h.
Definition at line 76 of file GeneticAlgorithm.h.
|
virtual |
this function provides the ability to change the stepSize of a mutation according to the success of the last generations.
Parameters: int ofSteps : = if OF the number of STEPS given in this variable (ofSteps) int successSteps : >sucessSteps Generations could improve the result double factor : than multiply the stepSize ( spread ) by this factor (if ofSteps == successSteps nothing is changed, if ofSteps < successSteps, the spread is divided by the factor)
using this function one can increase the stepSize of the mutation when we have good success (to pass fast through the easy phase-space) and reduce the stepSize if we are in a difficult "territory" of the phase-space.
Definition at line 207 of file GeneticAlgorithm.cxx.
Referenced by ROOT::Math::GeneticMinimizer::Minimize(), and TMVA::GeneticFitter::Run().
|
protected |
Definition at line 105 of file GeneticAlgorithm.h.
Int_t TMVA::GeneticAlgorithm::fConvCounter |
Definition at line 81 of file GeneticAlgorithm.h.
Referenced by TMVA::GeneticFitter::Run().
|
protected |
Definition at line 87 of file GeneticAlgorithm.h.
|
protected |
Definition at line 97 of file GeneticAlgorithm.h.
|
protected |
Definition at line 85 of file GeneticAlgorithm.h.
|
protected |
Definition at line 93 of file GeneticAlgorithm.h.
|
mutableprotected |
Definition at line 107 of file GeneticAlgorithm.h.
Referenced by Log(), and ~GeneticAlgorithm().
|
protected |
Definition at line 98 of file GeneticAlgorithm.h.
Referenced by GetMakeCopies(), and SetMakeCopies().
|
protected |
Definition at line 96 of file GeneticAlgorithm.h.
|
protected |
Definition at line 104 of file GeneticAlgorithm.h.
Referenced by GetGeneticPopulation().
|
protected |
Definition at line 100 of file GeneticAlgorithm.h.
|
protected |
Definition at line 102 of file GeneticAlgorithm.h.
|
protected |
Definition at line 95 of file GeneticAlgorithm.h.
Referenced by GetSpread(), and SetSpread().
|
protected |
Definition at line 92 of file GeneticAlgorithm.h.