GClasses
|
The base class for kernel functions. Classes which implement this must provide an "apply" method that applies the kernel to two vectors. Kernels may be combined together to form a more complex kernel, to which the kernel trick will still apply.
#include <GKernelTrick.h>
Public Member Functions | |
GKernel () | |
virtual | ~GKernel () |
virtual double | apply (const GVec &pA, const GVec &pB)=0 |
Applies the kernel to the two specified vectors. More... | |
virtual const char * | name () const =0 |
Returns the name of this kernel. More... | |
virtual GDomNode * | serialize (GDom *pDoc)=0 |
Marshalls this object into a DOM. More... | |
Static Public Member Functions | |
static GKernel * | deserialize (GDomNode *pNode) |
Deserializes a kernel object. More... | |
static GKernel * | kernelComplex1 () |
Returns a complex kernel made by combining several other kernels. This might be used to exercise kernel functionality or to test non-linear metrics. The caller is responsible to delete the object this returns. More... | |
Protected Member Functions | |
GDomNode * | makeBaseNode (GDom *pDoc) const |
Helper method used by the serialize methods in child classes. More... | |
|
inline |
|
inlinevirtual |
Applies the kernel to the two specified vectors.
Implemented in GClasses::GKernelNormalize, GClasses::GKernelExp, GClasses::GKernelPow, GClasses::GKernelMultiply, GClasses::GKernelAdd, GClasses::GKernelScale, GClasses::GKernelTranslate, GClasses::GKernelGaussianRBF, GClasses::GKernelPolynomial, GClasses::GKernelChiSquared, and GClasses::GKernelIdentity.
Deserializes a kernel object.
|
static |
Returns a complex kernel made by combining several other kernels. This might be used to exercise kernel functionality or to test non-linear metrics. The caller is responsible to delete the object this returns.
Helper method used by the serialize methods in child classes.
|
pure virtual |
Returns the name of this kernel.
Implemented in GClasses::GKernelNormalize, GClasses::GKernelExp, GClasses::GKernelPow, GClasses::GKernelMultiply, GClasses::GKernelAdd, GClasses::GKernelScale, GClasses::GKernelTranslate, GClasses::GKernelGaussianRBF, GClasses::GKernelPolynomial, GClasses::GKernelChiSquared, and GClasses::GKernelIdentity.
Marshalls this object into a DOM.
Implemented in GClasses::GKernelNormalize, GClasses::GKernelExp, GClasses::GKernelPow, GClasses::GKernelMultiply, GClasses::GKernelAdd, GClasses::GKernelScale, GClasses::GKernelTranslate, GClasses::GKernelGaussianRBF, GClasses::GKernelPolynomial, GClasses::GKernelChiSquared, and GClasses::GKernelIdentity.