source: trunk/lib/svm/Kernel.h @ 303

Last change on this file since 303 was 303, checked in by Peter, 17 years ago

docs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1// $Id: Kernel.h 303 2005-04-30 16:17:35Z peter $
2
3#ifndef _theplu_svm_kernel_
4#define _theplu_svm_kernel_
5
6#include <c++_tools/gslapi/matrix.h>
7
8namespace theplu {
9namespace svm {
10
11  class KernelFunction;
12
13  ///
14  ///   Class calculating the \f$NxN\f$ kernel matrix from the \f$MxN\f$
15  ///   data matrix using KernelFunction. Each column in the data matrix
16  ///   corresponds to one sample.
17  ///   
18  ///
19  class Kernel
20  {
21   
22  public:
23   
24    ///
25    ///   Constructor taking the data matrix and KernelFunction as
26    ///   input. @note Can not handle NaNs. When dealing with missing values,
27    ///   use constructor taking a weight matrix.
28    Kernel(const gslapi::matrix&, const KernelFunction&);
29   
30    ///
31    ///   Constructor taking the data matrix, the KernelFunction and a weight
32    ///   matrix as input.
33    Kernel(const gslapi::matrix&, const KernelFunction&, const gslapi::matrix&);
34
35    ///
36    ///   Destructor
37    virtual ~Kernel(void);
38
39    ///   @return Kernel matrix
40    ///
41    const gslapi::matrix& get() const {return k_;}
42   
43  private:
44    gslapi::matrix k_;
45    const KernelFunction* kf_;
46    bool weighted_;
47
48  }; // class Kernel
49
50}} // of namespace svm and namespace theplu
51
52#endif
Note: See TracBrowser for help on using the repository browser.