ModErn Text Analysis
META Enumerates Textual Applications
polynomial.h
Go to the documentation of this file.
1 
9 #include "meta.h"
10 
11 #ifndef META_CLASSIFY_KERNEL_POLYNOMIAL_H_
12 #define META_CLASSIFY_KERNEL_POLYNOMIAL_H_
13 
14 namespace meta
15 {
16 namespace classify
17 {
18 namespace kernel
19 {
20 
29 {
30  public:
38  polynomial(uint8_t power = 1, double c = 1) : power_{power}, c_{c}
39  {
40  // nothing
41  }
42 
46  template <class PostingsData>
47  double operator()(const PostingsData& first,
48  const PostingsData& second) const;
49 
50  private:
54  uint8_t power_;
55 
59  double c_;
60 };
61 }
62 }
63 }
64 
66 #endif
Contains top-level namespace documentation for the META toolkit.
double c_
, the scalar term for the kernel
Definition: polynomial.h:59
A polynomial kernel function for a linear classifier to adapt it to data that is not linearly separab...
Definition: polynomial.h:28
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition: analyzer.h:24
double operator()(const PostingsData &first, const PostingsData &second) const
Computes the value of .
Definition: polynomial.tcc:18
polynomial(uint8_t power=1, double c=1)
Constructs a new polynomial kernel with the given parameters.
Definition: polynomial.h:38
uint8_t power_
, the power for the kernel
Definition: polynomial.h:54