source: trunk/lib/classifier/Kernel_MEV.cc @ 545

Last change on this file since 545 was 545, checked in by Peter, 17 years ago

added feature selection for SVM

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 637 bytes
Line 
1// $Id: Kernel_MEV.cc 545 2006-03-06 13:35:45Z peter $
2
3#include <c++_tools/classifier/Kernel_MEV.h>
4
5#include <c++_tools/classifier/DataLookup1D.h>
6
7namespace theplu {
8namespace classifier { 
9
10  Kernel_MEV::Kernel_MEV(const Kernel_MEV& kernel, 
11                         const std::vector<size_t>& index)
12    : Kernel(kernel,index)
13  {
14  }
15
16
17  double Kernel_MEV::operator()(const size_t row, const size_t column) const
18  { 
19    return (*kf_)(DataLookup1D(*data_,row,false),
20                  DataLookup1D(*data_,column,false)); 
21  }
22
23
24  const Kernel_MEV* Kernel_MEV::selected(const std::vector<size_t>& index) const
25  {
26    return new Kernel_MEV(*this, index);
27  }
28
29
30
31}} // of namespace classifier and namespace theplu
Note: See TracBrowser for help on using the repository browser.