Last change
on this file since 306 was
306,
checked in by Peter, 18 years ago
|
splitted kernel in two versions SEV and MEV
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.1 KB
|
Rev | Line | |
---|
[25] | 1 | // $Id: Kernel_mev.h 306 2005-05-03 06:59:02Z peter $ |
---|
| 2 | |
---|
[295] | 3 | #ifndef _theplu_svm_kernel_ |
---|
| 4 | #define _theplu_svm_kernel_ |
---|
[25] | 5 | |
---|
[295] | 6 | #include <c++_tools/gslapi/matrix.h> |
---|
[25] | 7 | |
---|
[42] | 8 | namespace theplu { |
---|
[295] | 9 | namespace svm { |
---|
[25] | 10 | |
---|
[42] | 11 | class KernelFunction; |
---|
| 12 | |
---|
[51] | 13 | /// |
---|
| 14 | /// Class calculating the \f$NxN\f$ kernel matrix from the \f$MxN\f$ |
---|
[122] | 15 | /// data matrix using KernelFunction. Each column in the data matrix |
---|
[51] | 16 | /// corresponds to one sample. |
---|
| 17 | /// |
---|
| 18 | /// |
---|
[25] | 19 | class Kernel |
---|
| 20 | { |
---|
| 21 | |
---|
| 22 | public: |
---|
[303] | 23 | |
---|
| 24 | /// |
---|
[67] | 25 | /// Constructor taking the data matrix and KernelFunction as |
---|
[303] | 26 | /// input. @note Can not handle NaNs. When dealing with missing values, |
---|
[67] | 27 | /// use constructor taking a weight matrix. |
---|
| 28 | Kernel(const gslapi::matrix&, const KernelFunction&); |
---|
| 29 | |
---|
[51] | 30 | /// |
---|
[67] | 31 | /// Constructor taking the data matrix, the KernelFunction and a weight |
---|
| 32 | /// matrix as input. |
---|
| 33 | Kernel(const gslapi::matrix&, const KernelFunction&, const gslapi::matrix&); |
---|
| 34 | |
---|
[51] | 35 | /// |
---|
| 36 | /// Destructor |
---|
[25] | 37 | virtual ~Kernel(void); |
---|
[67] | 38 | |
---|
[51] | 39 | /// @return Kernel matrix |
---|
| 40 | /// |
---|
[42] | 41 | const gslapi::matrix& get() const {return k_;} |
---|
[26] | 42 | |
---|
[25] | 43 | private: |
---|
[42] | 44 | gslapi::matrix k_; |
---|
[295] | 45 | const KernelFunction* kf_; |
---|
[166] | 46 | bool weighted_; |
---|
[25] | 47 | |
---|
| 48 | }; // class Kernel |
---|
| 49 | |
---|
[295] | 50 | }} // of namespace svm and namespace theplu |
---|
[25] | 51 | |
---|
| 52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.