ModErn Text Analysis
META Enumerates Textual Applications
|
A sigmoid kernel function for a linear classifier to adapt it to data that is not linearly separable. More...
#include <sigmoid.h>
Public Member Functions | |
sigmoid (double alpha, double c) | |
Constructs a new sigmoid kernel with the given parameters. More... | |
template<class PostingsData > | |
double | operator() (const PostingsData &first, const PostingsData &second) const |
Computes the value of \(K(first, second)\). | |
Private Attributes | |
double | alpha_ |
\(\alpha\), the coefficient for the dot product. | |
double | c_ |
\(c\), the additional scalar term | |
polynomial | dot_ {1, 0.0} |
Internal "helper" kernel. | |
A sigmoid kernel function for a linear classifier to adapt it to data that is not linearly separable.
Uses the general form of: \(K(x,y) = \tanh(\alpha x^T y + c)\)
|
inline |
Constructs a new sigmoid kernel with the given parameters.
alpha | \(\alpha\), the coefficient for the dot product |
c | \(c\), the additional scalar term |