ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Private Attributes | List of all members
meta::classify::kernel::polynomial Class Reference

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
 

Detailed Description

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\)

Constructor & Destructor Documentation

meta::classify::kernel::polynomial::polynomial ( uint8_t  power = 1,
double  c = 1 
)
inline

Constructs a new polynomial kernel with the given parameters.

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

The documentation for this class was generated from the following files: