source: trunk/c++_tools/classifier/Kernel_MEV.h @ 629

Last change on this file since 629 was 629, checked in by Peter, 15 years ago

fixes #125 removing obsolete function and cleaning in Kernel classes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date ID
File size: 2.1 KB
Line 
1#ifndef _theplu_classifier_kernel_mev_
2#define _theplu_classifier_kernel_mev_
3
4// $Id$
5
6#include <c++_tools/classifier/DataLookup1D.h>
7#include <c++_tools/classifier/Kernel.h>
8#include <c++_tools/classifier/KernelFunction.h>
9
10namespace theplu {
11namespace classifier {
12  class MatrixLookup;
13  class MatrixLookupWeighted;
14
15  ///
16  /// @brief Memory Efficient Kernel Class taking care of the
17  ///   \f$ NxN \f$ kernel matrix, where \f$ N \f$ is number of
18  ///   samples. Type of Kernel is defined by a KernelFunction. This
19  ///   Memory Efficient Version (MEV) does not store the kernel
20  ///   matrix in memory, but calculates an element when it is
21  ///   needed. When memory allows do always use Kernel_SEV
22  ///   instead. This Kernel do not support missing values in form of
23  ///   NaNs. To deal with missing values, use KernelWeighted_MEV.
24  ///   
25  ///   @see also Kernel_SEV KernelWeighted_MEV
26  ///
27  class Kernel_MEV : public Kernel
28  {
29   
30  public:
31   
32    ///
33    /// Constructor taking the data matrix and KernelFunction as
34    /// input.Each column in the data matrix corresponds to one
35    /// sample. @note Can not handle NaNs.
36    ///
37    Kernel_MEV(const MatrixLookup& data, const KernelFunction& kf);
38
39
40    ///
41    /// Constructor taking the data matrix and KernelFunction as
42    /// input.Each column in the data matrix corresponds to one
43    /// sample. @note Can not handle NaNs.
44    ///
45    Kernel_MEV(const MatrixLookupWeighted& data, const KernelFunction& kf);
46
47
48    ///
49    ///
50    ///
51    Kernel_MEV(const Kernel_MEV& kernel, const std::vector<size_t>& index);
52
53
54    ///
55    /// Destructor
56    ///
57    inline virtual ~Kernel_MEV(void) {};
58
59    ///
60    /// @return Element at position (\a row, \a column) of the Kernel
61    /// matrix
62    ///
63    double operator()(const size_t row, const size_t column) const;
64   
65    ///
66    ///
67    ///
68    const Kernel_MEV* selected(const std::vector<size_t>& index) const;
69
70  private:
71    ///
72    /// Copy constructor (not implemented)
73    ///
74    Kernel_MEV(const Kernel_MEV&);
75    const Kernel_MEV& operator=(const Kernel_MEV&);
76
77  }; // class Kernel_MEV
78
79}} // of namespace classifier and namespace theplu
80
81#endif
Note: See TracBrowser for help on using the repository browser.