#ifndef ROOT_TMVA_MethodSVM
#define ROOT_TMVA_MethodSVM
#ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h"
#endif
#ifndef ROOT_TMVA_TMatrixD
#include "TMatrixD.h"
#endif
#ifndef ROOT_TMVA_TVectorD
#include "TVectorD.h"
#endif
namespace TMVA {
class MethodSVM : public MethodBase {
public:
MethodSVM( const TString& jobName,
const TString& methodTitle,
DataSet& theData,
const TString& theOption = "",
TDirectory* theTargetDir = 0 );
MethodSVM( DataSet& theData,
const TString& theWeightFile,
TDirectory* theTargetDir = NULL );
virtual ~MethodSVM( void );
void Train( void );
using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream;
void WriteWeightsToStream( std::ostream& o ) const;
void WriteWeightsToStream( TFile& fout ) const;
void ReadWeightsFromStream( std::istream& istr );
void ReadWeightsFromStream( TFile& fFin );
Double_t GetMvaValue();
void InitSVM( void );
const Ranking* CreateRanking() { return 0; }
enum EKernelType { kLinear , kRBF, kPolynomial, kSigmoidal };
protected:
void MakeClassSpecific( std::ostream&, const TString& ) const;
void GetHelpMessage() const;
private:
void DeclareOptions();
void ProcessOptions();
TString fTheKernel;
EKernelType fKernelType;
Float_t fC;
Float_t fTolerance;
Int_t fMaxIter;
Float_t fDoubleSigmaSquered;
Int_t fOrder;
Float_t fTheta;
Float_t fKappa;
Float_t fBparm;
Float_t fB_up;
Float_t fB_low;
Int_t fI_up;
Int_t fI_low;
Int_t fNsupv;
Int_t ExamineExample( Int_t );
Int_t TakeStep( Int_t , Int_t );
Float_t LearnFunc( Int_t );
Float_t (MethodSVM::*fKernelFunc)( Int_t, Int_t ) const;
Float_t LinearKernel ( Int_t, Int_t ) const;
Float_t RBFKernel ( Int_t, Int_t ) const;
Float_t PolynomialKernel( Int_t, Int_t ) const;
Float_t SigmoidalKernel ( Int_t, Int_t ) const;
vector< Float_t >* fAlphas;
vector< Float_t >* fErrorCache;
vector< Float_t >* fWeightVector;
vector< Float_t* >* fVariables;
vector< Float_t >* fNormVar;
vector< Int_t >* fTypesVec;
vector< Short_t >* fI;
vector< Float_t >* fKernelDiag;
vector < Float_t* >* fSupportVectors;
TVectorD* fMaxVars;
TVectorD* fMinVars;
void SetIndex( Int_t );
void PrepareDataToTrain();
void SetKernel();
void Results();
void StoreSupportVectors();
ClassDef(MethodSVM,0)
};
}
#endif // MethodSVM_H
Last change: Sat Nov 1 10:21:55 2008
Last generated: 2008-11-01 10:21
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.