Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
SimulatedAnnealingFitter.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Krzysztof Danielowski, Kamil Kraszewski, Maciej Kruk
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : SimulatedAnnealingFitter *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Fitter using Simulated Annealing algorithm *
12  * *
13  * Authors (alphabetical): *
14  * Krzysztof Danielowski <danielow@cern.ch> - IFJ & AGH, Poland *
15  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
16  * Kamil Kraszewski <kalq@cern.ch> - IFJ & UJ, Poland *
17  * Maciej Kruk <mkruk@cern.ch> - IFJ & AGH, Poland *
18  * *
19  * Copyright (c) 2008: *
20  * IFJ-Krakow, Poland *
21  * CERN, Switzerland *
22  * MPI-K Heidelberg, Germany *
23  * *
24  * Redistribution and use in source and binary forms, with or without *
25  * modification, are permitted according to the terms listed in LICENSE *
26  * (http://tmva.sourceforge.net/LICENSE) *
27  **********************************************************************************/
28 
29 #ifndef ROOT_TMVA_SimulatedAnnealingFitter
30 #define ROOT_TMVA_SimulatedAnnealingFitter
31 
32 //////////////////////////////////////////////////////////////////////////
33 // //
34 // SimulatedAnnealingFitter //
35 // //
36 // Fitter using a Simulated Annealing Algorithm //
37 // //
38 //////////////////////////////////////////////////////////////////////////
39 
40 #include "TMVA/FitterBase.h"
41 
42 namespace TMVA {
43 
44  class IFitterTarget;
45  class Interval;
46 
47  class SimulatedAnnealingFitter : public FitterBase {
48 
49  public:
50 
51  SimulatedAnnealingFitter( IFitterTarget& target, const TString& name,
52  const std::vector<TMVA::Interval*>& ranges, const TString& theOption );
53 
54  virtual ~SimulatedAnnealingFitter() {}
55 
56  void SetParameters( Int_t fMaxCalls,
57  Double_t fInitialTemperature,
58  Double_t fMinTemperature,
59  Double_t fEps,
60  TString fKernelTemperatureS,
61  Double_t fTemperatureScale,
62  Double_t fTemperatureAdaptiveStep,
63  Bool_t fUseDefaultScale,
64  Bool_t fUseDefaultTemperature );
65 
66  Double_t Run( std::vector<Double_t>& pars );
67 
68  private:
69 
70  void DeclareOptions();
71 
72  Int_t fMaxCalls; // max number of FCN calls
73  Double_t fInitialTemperature; // initial temperature (depends on FCN)
74  Double_t fMinTemperature; // minimum temperature before SA quit
75  Double_t fEps; // relative required FCN accuracy at minimum
76  TString fKernelTemperatureS; // string just to set fKernelTemperature
77  Double_t fTemperatureScale; // how fast temperature change
78  Double_t fAdaptiveSpeed; // how fast temperature change in adaptive (in adaptive two variables describe
79  // the change of temperature, but fAdaptiveSpeed should be 1.0 and its not
80  // recommended to change it)
81  Double_t fTemperatureAdaptiveStep; // used to calculate InitialTemperature if fUseDefaultTemperature
82  Bool_t fUseDefaultScale; // if TRUE, SA calculates its own TemperatureScale
83  Bool_t fUseDefaultTemperature; // if TRUE, SA calculates its own InitialTemperature (MinTemperautre)
84 
85  ClassDef(SimulatedAnnealingFitter,0); // Fitter using a Simulated Annealing Algorithm
86  };
87 
88 } // namespace TMVA
89 
90 #endif
91 
92