33 #ifndef ROOT_TMVA_MethodSVM 34 #define ROOT_TMVA_MethodSVM 44 #ifndef ROOT_TMVA_MethodBase 47 #ifndef ROOT_TMVA_TMatrixD 48 #ifndef ROOT_TMatrixDfwd 52 #ifndef ROOT_TMVA_TVectorD 56 #ifndef ROOT_TMVA_SVKernelFunction 65 class SVKernelFunction;
72 const TString& theOption =
"" );
83 std::vector<TMVA::SVKernelFunction::EKernelType>
MakeKernelList(std::string multiKernels,
TString kernel);
121 void GetMGamma(
const std::vector<float> & gammas);
176 #endif // MethodSVM_H void Train(void)
Train SVM.
void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
std::vector< TMVA::SVKernelFunction::EKernelType > MakeKernelList(std::string multiKernels, TString kernel)
MakeKernelList Function providing string manipulation for product or sum of kernels functions to take...
void DeclareCompatibilityOptions()
options that are used ONLY for the READER to ensure backward compatibility
Float_t fDoubleSigmaSquared
std::map< TString, std::vector< Double_t > > GetTuningOptions()
GetTuningOptions Function to allow for ranges and number of steps (for scan) when optimising kernel f...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
std::string fMultiKernels
std::vector< TMVA::SVEvent * > * fInputData
void AddWeightsXMLTo(void *parent) const
write configuration to xml file
void ProcessOptions()
option post processing (if necessary)
std::vector< TString > fVarNames
virtual void SetTuneParameters(std::map< TString, Double_t > tuneParameters)
Set the tuning parameters according to the arguement.
std::vector< Float_t > fmGamma
#define ClassDef(name, id)
void SetOrder(Double_t o)
void GetMGamma(const std::vector< float > &gammas)
Produces GammaList string for multigaussian kernel to be written to xml file.
void DeclareOptions()
declare options available for this method
void SetGamma(Double_t g)
void ReadWeightsFromXML(void *wghtnode)
void ReadWeightsFromStream(std::istream &istr)
MethodSVM(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="")
standard constructor
void Init(void)
default initialisation
SVKernelFunction * fSVKernelFunction
void SetTheta(Double_t t)
virtual std::map< TString, Double_t > OptimizeTuningParameters(TString fomType="ROCIntegral", TString fitType="Minuit")
Optimize Tuning Parameters This is used to optimise the kernel function parameters and cost...
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
SVM can handle classification with 2 classes and regression with one regression-target.
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
returns MVA value for given event
std::vector< TMVA::SVEvent * > * fSupportVectors
void WriteWeightsToStream(TFile &fout) const
TODO write IT write training sample (TTree) to file.
Double_t getLoss(TString lossFunction)
getLoss Calculates loss for testing dataset.
const Ranking * CreateRanking()
void GetHelpMessage() const
get help message text
Abstract ClassifierFactory template that handles arbitrary types.
virtual ~MethodSVM(void)
destructor
virtual void ReadWeightsFromStream(std::istream &)=0
void SetMGamma(std::string &mg)
Takes as input a string of values for multigaussian gammas and splits it, filling the gamma vector re...
void SetKappa(Double_t k)
const std::vector< Float_t > & GetRegressionValues()