ModErn Text Analysis
META Enumerates Textual Applications
sigmoid.h
Go to the documentation of this file.
1 
9 #include <cmath>
10 
12 #include "meta.h"
13 
14 #ifndef META_CLASSIFY_KERNEL_SIGMOID_H_
15 #define META_CLASSIFY_KERNEL_SIGMOID_H_
16 
17 namespace meta
18 {
19 namespace classify
20 {
21 namespace kernel
22 {
23 
31 class sigmoid
32 {
33  public:
40  sigmoid(double alpha, double c) : alpha_{alpha}, c_{c}
41  {
42  /* nothing */
43  }
44 
48  template <class PostingsData>
49  double operator()(const PostingsData& first,
50  const PostingsData& second) const;
51 
52  private:
56  double alpha_;
57 
61  double c_;
62 
66  polynomial dot_{1, 0.0};
67 };
68 }
69 }
70 }
71 
73 #endif
Contains top-level namespace documentation for the META toolkit.
A polynomial kernel function for a linear classifier to adapt it to data that is not linearly separab...
Definition: polynomial.h:28
A sigmoid kernel function for a linear classifier to adapt it to data that is not linearly separable...
Definition: sigmoid.h:31
double alpha_
, the coefficient for the dot product.
Definition: sigmoid.h:56
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
polynomial dot_
Internal "helper" kernel.
Definition: sigmoid.h:66
double operator()(const PostingsData &first, const PostingsData &second) const
Computes the value of .
Definition: sigmoid.tcc:16
double c_
, the additional scalar term
Definition: sigmoid.h:61
sigmoid(double alpha, double c)
Constructs a new sigmoid kernel with the given parameters.
Definition: sigmoid.h:40