source: trunk/c++_tools/classifier/Kernel_SEV.h @ 648

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

fixes #133 removed all errors reported from Doxygen. Only one error left which says Index is not documented but I don't want it to be documented actually we use the Doxygens preprocessor to skip documenting that class, yet Doxygen complains that class is not documented huh. Only solution would be to move that class to its own file and not keep it together with SVM.

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