Last change
on this file since 307 was
307,
checked in by Peter, 18 years ago
|
changed names of Kernels and made them work
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.2 KB
|
Line | |
---|
1 | // $Id: Kernel_SEV.h 307 2005-05-03 13:28:29Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_svm_kernel_sev_ |
---|
4 | #define _theplu_svm_kernel_sev_ |
---|
5 | |
---|
6 | #include <c++_tools/gslapi/matrix.h> |
---|
7 | #include <c++_tools/svm/Kernel_MEV.h> |
---|
8 | |
---|
9 | |
---|
10 | namespace theplu { |
---|
11 | namespace svm { |
---|
12 | |
---|
13 | class KernelFunction; |
---|
14 | |
---|
15 | /// |
---|
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 Speed Efficient Versions (SEV) calculated |
---|
19 | /// the kernel matrix once and the kernel is stored in memory. |
---|
20 | /// |
---|
21 | /// @see also Kernel_MEV |
---|
22 | /// |
---|
23 | class Kernel_SEV : public Kernel_MEV |
---|
24 | { |
---|
25 | |
---|
26 | public: |
---|
27 | |
---|
28 | /// |
---|
29 | /// Constructor taking the data matrix and KernelFunction as |
---|
30 | /// input. @note Can not handle NaNs. When dealing with missing values, |
---|
31 | /// use constructor taking a weight matrix. |
---|
32 | Kernel_SEV(const gslapi::matrix&, const KernelFunction&); |
---|
33 | |
---|
34 | Kernel_SEV(const Kernel_SEV&); |
---|
35 | |
---|
36 | /// |
---|
37 | /// Destructor |
---|
38 | /// |
---|
39 | virtual ~Kernel_SEV(void); |
---|
40 | |
---|
41 | /// |
---|
42 | /// @return element at position (\a row, \a column) of the Kernel |
---|
43 | /// matrix |
---|
44 | /// |
---|
45 | inline double operator()(size_t row,size_t column) const |
---|
46 | { return kernel_(row,column); } |
---|
47 | |
---|
48 | private: |
---|
49 | gslapi::matrix kernel_; |
---|
50 | |
---|
51 | }; // class Kernel_SEV |
---|
52 | |
---|
53 | }} // of namespace svm and namespace theplu |
---|
54 | |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.