source: trunk/c++_tools/classifier/Kernel_SEV.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.0 KB
Line 
1#ifndef _theplu_classifier_kernel_sev_
2#define _theplu_classifier_kernel_sev_
3
4// $Id$
5
6#include <c++_tools/classifier/Kernel.h>
7#include <c++_tools/utility/matrix.h>
8
9
10namespace theplu {
11namespace classifier {
12
13  class DataLookup1D;
14  class KernelFunction;
15
16  ///
17  ///   @brief Speed Efficient Kernel
18  ///   Class taking care of the \f$ NxN \f$ kernel matrix, where
19  ///   \f$ N \f$ is number of samples. Type of Kernel is defined by a
20  ///   KernelFunction. This Speed Efficient Version (SEV) calculated
21  ///   the kernel matrix once by construction and the kernel is stored in
22  ///   memory. When \f$ N \f$ is large and the kernel matrix cannot be
23  ///   stored in memory, use Kernel_MEV instead.
24  ///   
25  ///   @see also Kernel_MEV KernelWeighted_SEV
26  ///
27  class Kernel_SEV : public Kernel
28  {
29   
30  public:
31
32    ///
33    /// Constructor taking the data matrix and KernelFunction as
34    /// input. @note Can not handle NaNs. When dealing with missing values,
35    /// use KernelWeighted_SEV instead.
36    ///
37    Kernel_SEV(const MatrixLookup&, const KernelFunction&);
38   
39    ///
40    /// Constructor taking the data matrix and KernelFunction as
41    /// input. @note Can not handle NaNs. When dealing with missing values,
42    /// use KernelWeighted_SEV instead.
43    ///
44    Kernel_SEV(const MatrixLookupWeighted&, const KernelFunction&);
45   
46    ///
47    ///
48    ///
49    Kernel_SEV(const Kernel_SEV& kernel, const std::vector<size_t>& index);
50
51    ///
52    /// @return element at position (\a row, \a column) in the Kernel
53    /// matrix
54    ///
55    inline double operator()(const size_t row,const size_t column) const
56    { return kernel_matrix_(row,column); }
57
58    ///
59    /// @todo remove this function
60    ///
61    const Kernel* selected(const std::vector<size_t>& index) const;
62
63  private:
64    ///
65    /// Copy constructor (not implemented)
66    ///
67    Kernel_SEV(const Kernel_SEV&);
68    const Kernel_SEV& operator=(const Kernel_SEV&);
69
70    void build_kernel(void);
71
72    utility::matrix kernel_matrix_;
73
74  }; // class Kernel_SEV
75
76}} // of namespace classifier and namespace theplu
77
78#endif
Note: See TracBrowser for help on using the repository browser.