33#ifndef ROOT_TMVA_MethodSVM
34#define ROOT_TMVA_MethodSVM
50#ifndef ROOT_TMVA_TVectorD
59 class SVKernelFunction;
66 const TString& theOption =
"" );
77 std::vector<TMVA::SVKernelFunction::EKernelType>
MakeKernelList(std::string multiKernels,
TString kernel);
115 void GetMGamma(
const std::vector<float> & gammas);
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Class that contains all the data information.
Virtual base Class for all MVA method.
virtual void ReadWeightsFromStream(std::istream &)=0
SMO Platt's SVM classifier with Keerthi & Shavade improvements.
Double_t getLoss(TString lossFunction)
getLoss Calculates loss for testing dataset.
Float_t fTolerance
tolerance parameter
virtual void SetTuneParameters(std::map< TString, Double_t > tuneParameters)
Set the tuning parameters according to the argument.
TVectorD * fMaxVars
for normalization //is it still needed??
void SetKappa(Double_t k)
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr)
returns MVA value for given event
TVectorD * fMinVars
for normalization //is it still needed??
void DeclareOptions()
declare options available for this method
std::vector< TString > fVarNames
void WriteWeightsToStream(TFile &fout) const
TODO write IT write training sample (TTree) to file.
void SetMGamma(std::string &mg)
Takes as input a string of values for multigaussian gammas and splits it, filling the gamma vector re...
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.
SVKernelFunction * fSVKernelFunction
kernel function
Float_t fBparm
free plane coefficient
void ReadWeightsFromStream(std::istream &istr)
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.
Float_t fDoubleSigmaSquared
for RBF Kernel
void GetMGamma(const std::vector< float > &gammas)
Produces GammaList string for multigaussian kernel to be written to xml file.
void AddWeightsXMLTo(void *parent) const
write configuration to xml file
Float_t fNumVars
number of input variables for multi-gaussian
Int_t fOrder
for Polynomial Kernel ( polynomial order )
void SetTheta(Double_t t)
void SetGamma(Double_t g)
std::vector< TMVA::SVEvent * > * fSupportVectors
contains support vectors
Float_t fKappa
for Sigmoidal Kernel
Float_t fGamma
RBF Kernel parameter.
void SetOrder(Double_t o)
UShort_t fNSubSets
nr of subsets, default 1
std::map< TString, std::vector< Double_t > > GetTuningOptions()
GetTuningOptions Function to allow for ranges and number of steps (for scan) when optimising kernel f...
void ReadWeightsFromXML(void *wghtnode)
std::vector< Float_t > fmGamma
vector of gammas for multi-gaussian kernel
void ProcessOptions()
option post processing (if necessary)
void Train(void)
Train SVM.
const Ranking * CreateRanking()
std::vector< TMVA::SVEvent * > * fInputData
vector of training data in SVM format
void Init(void)
default initialisation
void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
virtual ~MethodSVM(void)
destructor
TString fTheKernel
kernel name
std::string fMultiKernels
Float_t fTheta
for Sigmoidal Kernel
const std::vector< Float_t > & GetRegressionValues()
std::string fTune
Specify parameters to be tuned.
void GetHelpMessage() const
get help message text
UInt_t fMaxIter
max number of iteration
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
SVWorkingSet * fWgSet
svm working set
Ranking for variables in method (implementation)
Kernel for Support Vector Machine.
Working class for Support Vector Machine.
create variable transformations