33#ifndef ROOT_TMVA_MethodSVM
34#define ROOT_TMVA_MethodSVM
50#ifndef ROOT_TMVA_TVectorD
66 const TString& theOption =
"" );
77 std::vector<TMVA::SVKernelFunction::EKernelType>
MakeKernelList(std::string multiKernels,
TString kernel);
81 void Train(
void )
override;
84 void Reset(
void )
override;
101 void Init(
void )
override;
115 void GetMGamma(
const std::vector<float> & gammas);
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
#define ClassDefOverride(name, id)
TVectorT< Double_t > TVectorD
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Class that contains all the data information.
MethodBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption="")
standard constructor
void ReadWeightsFromStream(std::istream &) override=0
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).
Event class for Support Vector Machine.
Kernel for Support Vector Machine.
Working class for Support Vector Machine.
create variable transformations