#ifndef ROOT_TMVA_MethodSVM
#define ROOT_TMVA_MethodSVM
#ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h"
#endif
#ifndef ROOT_TMVA_TMatrixD
#ifndef ROOT_TMatrixDfwd
#include "TMatrixDfwd.h"
#endif
#endif
#ifndef ROOT_TMVA_TVectorD
#ifndef ROOT_TVectorD
#include "TVectorD.h"
#endif
#ifndef ROOT_TMVA_SVKernelFunction
#include "TMVA/SVKernelFunction.h"
#endif
#endif
namespace TMVA
{
class SVWorkingSet;
class SVEvent;
class SVKernelFunction;
class MethodSVM : public MethodBase {
public:
MethodSVM( const TString& jobName, const TString& methodTitle, DataSetInfo& theData,
const TString& theOption = "" );
MethodSVM( DataSetInfo& theData, const TString& theWeightFile);
virtual ~MethodSVM( void );
virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets );
virtual std::map<TString,Double_t> OptimizeTuningParameters(TString fomType="ROCIntegral", TString fitType="Minuit");
virtual void SetTuneParameters(std::map<TString,Double_t> tuneParameters);
std::vector<TMVA::SVKernelFunction::EKernelType> MakeKernelList(std::string multiKernels, TString kernel);
std::map< TString,std::vector<Double_t> > GetTuningOptions();
void Train( void );
void Reset( void );
using MethodBase::ReadWeightsFromStream;
void WriteWeightsToStream( TFile& fout ) const;
void AddWeightsXMLTo ( void* parent ) const;
void ReadWeightsFromStream( std::istream& istr );
void ReadWeightsFromStream( TFile& fFin );
void ReadWeightsFromXML ( void* wghtnode );
Double_t GetMvaValue( Double_t* err = 0, Double_t* errUpper = 0 );
const std::vector<Float_t>& GetRegressionValues();
void Init( void );
const Ranking* CreateRanking() { return 0; }
void SetGamma(Double_t g){fGamma = g;}
void SetCost(Double_t c){fCost = c;}
void SetMGamma(std::string & mg);
void SetOrder(Double_t o){fOrder = o;}
void SetTheta(Double_t t){fTheta = t;}
void SetKappa(Double_t k){fKappa = k;}
void SetMult(Double_t m){fMult = m;}
void GetMGamma(const std::vector<float> & gammas);
protected:
void MakeClassSpecific( std::ostream&, const TString& ) const;
void GetHelpMessage() const;
private:
void DeclareOptions();
void DeclareCompatibilityOptions();
void ProcessOptions();
Double_t getLoss( TString lossFunction );
Float_t fCost;
Float_t fTolerance;
UInt_t fMaxIter;
UShort_t fNSubSets;
Float_t fBparm;
Float_t fGamma;
SVWorkingSet* fWgSet;
std::vector<TMVA::SVEvent*>* fInputData;
std::vector<TMVA::SVEvent*>* fSupportVectors;
SVKernelFunction* fSVKernelFunction;
TVectorD* fMinVars;
TVectorD* fMaxVars;
TString fTheKernel;
Float_t fDoubleSigmaSquared;
Int_t fOrder;
Float_t fTheta;
Float_t fKappa;
Float_t fMult;
std::vector<Float_t> fmGamma;
Float_t fNumVars;
std::vector<TString> fVarNames;
std::string fGammas;
std::string fGammaList;
std::string fTune;
std::string fMultiKernels;
Int_t fDataSize;
TString fLoss;
ClassDef(MethodSVM,0);
};
}
#endif // MethodSVM_H