source: trunk/lib/svm/Kernel_MEV.h @ 330

Last change on this file since 330 was 330, checked in by Peter, 18 years ago

added an abstract base class for Kernel from which Kernel_SEV Kernel_MEV are inherited. Also added a separate class for viewing into subKernels

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1// $Id: Kernel_MEV.h 330 2005-06-01 21:30:47Z peter $
2
3#ifndef _theplu_svm_kernel_mev
4#define _theplu_svm_kernel_mev
5
6#include <c++_tools/svm/Kernel.h>
7#include <c++_tools/gslapi/matrix.h>
8
9namespace theplu {
10namespace svm {
11
12  class KernelFunction;
13
14  ///
15  ///   @brief Memory Efficient Kernel
16  ///   Class taking care of the \f$NxN\f$ kernel matrix, where
17  ///   \f$N\f$ is number of samples. Type of Kernel is defined by a
18  ///   KernelFunction. This Memory Efficient Version (MEV) does not
19  ///   store the kernel matrix in memory, but calculates each element
20  ///   when it is needed. When memory allows do always use Kernel_SEV
21  ///   instead.
22  ///   
23  ///   @see also Kernel_SEV
24  ///
25  class Kernel_MEV : public Kernel
26  {
27   
28  public:
29   
30    ///
31    ///  Default constructor (not implemented)
32    ///
33    Kernel_MEV();
34
35    ///
36    ///   Constructor taking the data matrix and KernelFunction as
37    ///   input.Each column in the data matrix corresponds to one
38    ///   sample. @note Can not handle NaNs.
39    ///
40    Kernel_MEV(const gslapi::matrix&, const KernelFunction&);
41   
42    ///
43    ///   @todo
44    ///   Constructor taking the \a data matrix, the KernelFunction and a
45    ///   \a weight matrix as input. Each column in the data matrix
46    ///   corresponds to one sample.
47    Kernel_MEV(const gslapi::matrix& data, const KernelFunction&, 
48               const gslapi::matrix& weight);
49
50    ///
51    ///   Destructor
52    ///
53    virtual ~Kernel_MEV(void);
54
55    ///
56    /// @return element at position (\a row, \a column) of the Kernel
57    /// matrix
58    ///
59    double operator()(const size_t row,const size_t column) const;
60
61
62  }; // class Kernel_MEV
63
64}} // of namespace svm and namespace theplu
65
66#endif
Note: See TracBrowser for help on using the repository browser.