Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:10

0001 // @(#)root/tmva $Id$
0002 // Author: Andrzej Zemla
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  * Class  : SVKernelFunction                                                      *
0008  *                                             *
0009  *                                                                                *
0010  * Description:                                                                   *
0011  *      Kernel for Support Vector Machine                                         *
0012  *                                                                                *
0013  * Authors (alphabetical):                                                        *
0014  *      Marcin Wolter  <Marcin.Wolter@cern.ch> - IFJ PAN, Krakow, Poland          *
0015  *      Andrzej Zemla  <azemla@cern.ch>        - IFJ PAN, Krakow, Poland          *
0016  *      (IFJ PAN: Henryk Niewodniczanski Inst. Nucl. Physics, Krakow, Poland)     *
0017  *                                                                                *
0018  * Copyright (c) 2005:                                                            *
0019  *      CERN, Switzerland                                                         *
0020  *      MPI-K Heidelberg, Germany                                                 *
0021  *      PAN, Krakow, Poland                                                       *
0022  *                                                                                *
0023  * Redistribution and use in source and binary forms, with or without             *
0024  * modification, are permitted according to the terms listed in LICENSE           *
0025  * (see tmva/doc/LICENSE)                                          *
0026  **********************************************************************************/
0027 
0028 #ifndef ROOT_TMVA_SVKernelFunction
0029 #define ROOT_TMVA_SVKernelFunction
0030 
0031 #include "RtypesCore.h"
0032 #include <vector>
0033 
0034 namespace TMVA {
0035 
0036    class SVEvent;
0037    class SVKernelFunction {
0038 
0039    public:
0040 
0041       enum EKernelType { kLinear , kRBF, kPolynomial, kSigmoidal, kMultiGauss, kProd, kSum};
0042 
0043       SVKernelFunction();
0044       SVKernelFunction( Float_t );
0045       SVKernelFunction( EKernelType, Float_t, Float_t=0);
0046       SVKernelFunction( std::vector<float> params );
0047       SVKernelFunction(EKernelType k, std::vector<EKernelType> kernels, std::vector<Float_t> gammas, Float_t gamma, Float_t order, Float_t theta);
0048       ~SVKernelFunction();
0049 
0050       Float_t Evaluate( SVEvent* ev1, SVEvent* ev2 );
0051 
0052       void setCompatibilityParams(EKernelType k, UInt_t order, Float_t theta, Float_t kappa);
0053 
0054    private:
0055 
0056       Float_t fGamma;   // documentation
0057 
0058       // vector of gammas for multidimensional gaussian
0059       std::vector<Float_t> fmGamma;
0060 
0061       // kernel, order, theta, and kappa are for backward compatibility
0062       EKernelType fKernel;
0063       UInt_t      fOrder;
0064       Float_t     fTheta;
0065       Float_t     fKappa;
0066 
0067       std::vector<EKernelType> fKernelsList;
0068    };
0069 }
0070 
0071 #endif