33#ifndef ROOT_TMVA_MethodSVM
34#define ROOT_TMVA_MethodSVM
50#ifndef ROOT_TMVA_TVectorD
59 class SVKernelFunction;
81 void Train(
void )
override;
84 void Reset(
void )
override;
101 void Init(
void )
override;
float Float_t
Float 4 bytes (float)
double Double_t
Double 8 bytes.
#define ClassDefOverride(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.
void ReadWeightsFromStream(std::istream &) override=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
TVectorD * fMaxVars
for normalization //is it still needed??
Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets) override
SVM can handle classification with 2 classes and regression with one regression-target.
void Init(void) override
default initialisation
void Reset(void) override
void SetKappa(Double_t k)
void ReadWeightsFromXML(void *wghtnode) override
TVectorD * fMinVars
for normalization //is it still needed??
void Train(void) override
Train SVM.
std::vector< TString > fVarNames
void MakeClassSpecific(std::ostream &, const TString &) const override
write specific classifier response
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...
SVKernelFunction * fSVKernelFunction
kernel function
Float_t fBparm
free plane coefficient
void GetHelpMessage() const override
get help message text
Float_t fDoubleSigmaSquared
for RBF Kernel
void SetTuneParameters(std::map< TString, Double_t > tuneParameters) override
Set the tuning parameters according to the argument.
void GetMGamma(const std::vector< float > &gammas)
Produces GammaList string for multigaussian kernel to be written to xml file.
const Ranking * CreateRanking() override
Float_t fNumVars
number of input variables for multi-gaussian
void AddWeightsXMLTo(void *parent) const override
write configuration to xml file
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
std::map< TString, Double_t > OptimizeTuningParameters(TString fomType="ROCIntegral", TString fitType="Minuit") override
Optimize Tuning Parameters This is used to optimise the kernel function parameters and cost.
Float_t fGamma
RBF Kernel parameter.
void SetOrder(Double_t o)
void ProcessOptions() override
option post processing (if necessary)
UShort_t fNSubSets
nr of subsets, default 1
void DeclareOptions() override
declare options available for this method
std::map< TString, std::vector< Double_t > > GetTuningOptions()
GetTuningOptions Function to allow for ranges and number of steps (for scan) when optimising kernel f...
std::vector< Float_t > fmGamma
vector of gammas for multi-gaussian kernel
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr) override
returns MVA value for given event
void ReadWeightsFromStream(std::istream &istr) override
std::vector< TMVA::SVEvent * > * fInputData
vector of training data in SVM format
const std::vector< Float_t > & GetRegressionValues() override
virtual ~MethodSVM(void)
destructor
void DeclareCompatibilityOptions() override
options that are used ONLY for the READER to ensure backward compatibility
TString fTheKernel
kernel name
std::string fMultiKernels
Float_t fTheta
for Sigmoidal Kernel
MethodSVM(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="")
standard constructor
std::string fTune
Specify parameters to be tuned.
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...
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