ModErn Text Analysis
META Enumerates Textual Applications
|
A polynomial kernel function for a linear classifier to adapt it to data that is not linearly separable. More...
#include <polynomial.h>
Public Member Functions | |
polynomial (uint8_t power=1, double c=1) | |
Constructs a new polynomial 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 | |
uint8_t | power_ |
\(p\), the power for the kernel | |
double | c_ |
\(c\), the scalar term for the kernel | |
A polynomial kernel function for a linear classifier to adapt it to data that is not linearly separable.
Uses the general form of: \(K(x,z) = (x^T z + c)^p\)
|
inline |
Constructs a new polynomial kernel with the given parameters.
power | \(p\), the power for the polynomial kernel. |
c | \(c\), the additional scalar term to allow for the use of existing features in the original space |