00001 // @(#)root/tmva $Id: SimulatedAnnealingFitter.h 29122 2009-06-22 06:51:30Z brun $ 00002 // Author: Andreas Hoecker, Krzysztof Danielowski, Kamil Kraszewski, Maciej Kruk 00003 00004 /********************************************************************************** 00005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 00006 * Package: TMVA * 00007 * Class : SimulatedAnnealingFitter * 00008 * Web : http://tmva.sourceforge.net * 00009 * * 00010 * Description: * 00011 * Fitter using Simulated Annealing algorithm * 00012 * * 00013 * Authors (alphabetical): * 00014 * Krzysztof Danielowski <danielow@cern.ch> - IFJ & AGH, Poland * 00015 * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland * 00016 * Kamil Kraszewski <kalq@cern.ch> - IFJ & UJ, Poland * 00017 * Maciej Kruk <mkruk@cern.ch> - IFJ & AGH, Poland * 00018 * * 00019 * Copyright (c) 2008: * 00020 * IFJ-Krakow, Poland * 00021 * CERN, Switzerland * 00022 * MPI-K Heidelberg, Germany * 00023 * * 00024 * Redistribution and use in source and binary forms, with or without * 00025 * modification, are permitted according to the terms listed in LICENSE * 00026 * (http://tmva.sourceforge.net/LICENSE) * 00027 **********************************************************************************/ 00028 00029 #ifndef ROOT_TMVA_SimulatedAnnealingFitter 00030 #define ROOT_TMVA_SimulatedAnnealingFitter 00031 00032 ////////////////////////////////////////////////////////////////////////// 00033 // // 00034 // SimulatedAnnealingFitter // 00035 // // 00036 // Fitter using a Simulated Annealing Algorithm // 00037 // // 00038 ////////////////////////////////////////////////////////////////////////// 00039 00040 #ifndef ROOT_TMVA_FitterBase 00041 #include "TMVA/FitterBase.h" 00042 #endif 00043 00044 namespace TMVA { 00045 00046 class IFitterTarget; 00047 class Interval; 00048 00049 class SimulatedAnnealingFitter : public FitterBase { 00050 00051 public: 00052 00053 SimulatedAnnealingFitter( IFitterTarget& target, const TString& name, 00054 const std::vector<TMVA::Interval*>& ranges, const TString& theOption ); 00055 00056 virtual ~SimulatedAnnealingFitter() {} 00057 00058 void SetParameters( Int_t fMaxCalls, 00059 Double_t fInitialTemperature, 00060 Double_t fMinTemperature, 00061 Double_t fEps, 00062 TString fKernelTemperatureS, 00063 Double_t fTemperatureScale, 00064 Double_t fTemperatureAdaptiveStep, 00065 Bool_t fUseDefaultScale, 00066 Bool_t fUseDefaultTemperature ); 00067 00068 Double_t Run( std::vector<Double_t>& pars ); 00069 00070 private: 00071 00072 void DeclareOptions(); 00073 00074 Int_t fMaxCalls; // max number of FCN calls 00075 Double_t fInitialTemperature; // initial temperature (depends on FCN) 00076 Double_t fMinTemperature; // minimum temperature before SA quit 00077 Double_t fEps; // relative required FCN accuracy at minimum 00078 TString fKernelTemperatureS; // string just to set fKernelTemperature 00079 Double_t fTemperatureScale; // how fast temperature change 00080 Double_t fAdaptiveSpeed; // how fast temperature change in adaptive (in adaptive two variables describe 00081 // the change of temperature, but fAdaptiveSpeed should be 1.0 and its not 00082 // recomended to change it) 00083 Double_t fTemperatureAdaptiveStep; // used to calculate InitialTemperature if fUseDefaultTemperature 00084 Bool_t fUseDefaultScale; // if TRUE, SA calculates its own TemperatureScale 00085 Bool_t fUseDefaultTemperature; // if TRUE, SA calculates its own InitialTemperature (MinTemperautre) 00086 00087 ClassDef(SimulatedAnnealingFitter,0) // Fitter using a Simulated Annealing Algorithm 00088 }; 00089 00090 } // namespace TMVA 00091 00092 #endif 00093 00094