ModErn Text Analysis
META Enumerates Textual Applications
Classes | Typedefs | Functions
meta::classify::kernel Namespace Reference

Kernel functions for linear classifiers. More...

Classes

class  kernel
 Base class for kernels used in kernel-supporting classifiers. More...
 
class  kernel_factory
 Factory that is responsible for creating kernels from configuration tables. More...
 
class  kernel_loader
 Factory that is responsible for loading kernels from streams. More...
 
class  polynomial
 A polynomial kernel function for a linear classifier to adapt it to data that is not linearly separable. More...
 
class  radial_basis
 A radial basis function kernel for linear classifiers to adapt them to data that is not linearly separable. More...
 
class  sigmoid
 A sigmoid kernel function for a linear classifier to adapt it to data that is not linearly separable. More...
 

Typedefs

using feature_vector = learn::feature_vector
 

Functions

std::unique_ptr< kernelmake_kernel (const cpptoml::table &)
 Convenience method for making a kernel using the factory. More...
 
std::unique_ptr< kernelload_kernel (std::istream &in)
 Convenience method for loading a kernel using the factory. More...
 
template<class Kernel >
void register_kernel ()
 Registration method for kernels. More...
 
template<>
std::unique_ptr< kernelmake_kernel< polynomial > (const cpptoml::table &)
 Specialization of the factory method used to create polynomial kernels.
 
template<>
std::unique_ptr< kernelmake_kernel< radial_basis > (const cpptoml::table &)
 Specialization of the factory method used to create rbf kernels.
 
template<>
std::unique_ptr< kernelmake_kernel< sigmoid > (const cpptoml::table &)
 Specialization of the factory method used to create sigmoid kernels.
 

Detailed Description

Kernel functions for linear classifiers.

Function Documentation

§ make_kernel()

std::unique_ptr< kernel > meta::classify::kernel::make_kernel ( const cpptoml::table &  config)

Convenience method for making a kernel using the factory.

Factory method for creating a kernel.

This should be specialized if your given kernel requires special construction behavior (e.g., reading parameters).

§ load_kernel()

std::unique_ptr< kernel > meta::classify::kernel::load_kernel ( std::istream &  in)

Convenience method for loading a kernel using the factory.

Factory method for loading a kernel.

This should be specialized if your given kernel requires special construction behavior. Otherwise, it is assumed that the kernel has a constructor from a std::istream&.

§ register_kernel()

template<class Kernel >
void meta::classify::kernel::register_kernel ( )

Registration method for kernels.

Clients should use this method to register any new kernels they write.