Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
SVKernelFunction.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andrzej Zemla
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : SVKernelFunction *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Kernel for Support Vector Machine *
12  * *
13  * Authors (alphabetical): *
14  * Marcin Wolter <Marcin.Wolter@cern.ch> - IFJ PAN, Krakow, Poland *
15  * Andrzej Zemla <azemla@cern.ch> - IFJ PAN, Krakow, Poland *
16  * (IFJ PAN: Henryk Niewodniczanski Inst. Nucl. Physics, Krakow, Poland) *
17  * *
18  * Copyright (c) 2005: *
19  * CERN, Switzerland *
20  * MPI-K Heidelberg, Germany *
21  * PAN, Krakow, Poland *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 #ifndef ROOT_TMVA_SVKernelFunction
29 #define ROOT_TMVA_SVKernelFunction
30 
31 #include "Rtypes.h"
32 
33 namespace TMVA {
34 
35  class SVEvent;
36  class SVKernelFunction {
37 
38  public:
39 
40  enum EKernelType { kLinear , kRBF, kPolynomial, kSigmoidal, kMultiGauss, kProd, kSum};
41 
42  SVKernelFunction();
43  SVKernelFunction( Float_t );
44  SVKernelFunction( EKernelType, Float_t, Float_t=0);
45  SVKernelFunction( std::vector<float> params );
46  SVKernelFunction(EKernelType k, std::vector<EKernelType> kernels, std::vector<Float_t> gammas, Float_t gamma, Float_t order, Float_t theta);
47  ~SVKernelFunction();
48 
49  Float_t Evaluate( SVEvent* ev1, SVEvent* ev2 );
50 
51  void setCompatibilityParams(EKernelType k, UInt_t order, Float_t theta, Float_t kappa);
52 
53  private:
54 
55  Float_t fGamma; // documentation
56 
57  // vector of gammas for multidimensional gaussian
58  std::vector<Float_t> fmGamma;
59 
60  // kernel, order, theta, and kappa are for backward compatibility
61  EKernelType fKernel;
62  UInt_t fOrder;
63  Float_t fTheta;
64  Float_t fKappa;
65 
66  std::vector<EKernelType> fKernelsList;
67  };
68 }
69 
70 #endif