Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
reranker::KernelFunction Class Referenceabstract

An interface specifying a kernel function for two FeatureVector instances. More...

#include <kernel-function.H>

Inheritance diagram for reranker::KernelFunction:
reranker::DotProduct

Public Member Functions

virtual ~KernelFunction ()
 
virtual double Apply (const FeatureVector< int, double > &fv1, const FeatureVector< int, double > &fv2)
 Applies this kernel function to the specified feature vectors. More...
 
virtual double Apply (const FeatureVector< int, double > &fv1, int index1, const FeatureVector< int, double > &fv2, int index2) const =0
 Applies this kernel function to the specified feature vectors. More...
 

Detailed Description

An interface specifying a kernel function for two FeatureVector instances.

The two index arguments can be of help to kernel function implementations that either cache results, or else have access to the precomputed square matrix of kernel function values for all training vectors.

Definition at line 50 of file kernel-function.H.

Constructor & Destructor Documentation

virtual reranker::KernelFunction::~KernelFunction ( )
inlinevirtual

Definition at line 52 of file kernel-function.H.

Member Function Documentation

virtual double reranker::KernelFunction::Apply ( const FeatureVector< int, double > &  fv1,
const FeatureVector< int, double > &  fv2 
)
inlinevirtual

Applies this kernel function to the specified feature vectors.

Definition at line 54 of file kernel-function.H.

virtual double reranker::KernelFunction::Apply ( const FeatureVector< int, double > &  fv1,
int  index1,
const FeatureVector< int, double > &  fv2,
int  index2 
) const
pure virtual

Applies this kernel function to the specified feature vectors.

Parameters
fv1the first feature vector
index1the training example index of the first feature vector, if known, or else -1; concrete implementations may ignore this argument
fv2the second feature vector
index2the training example index of the second feature vector, if known, or else -1; concrete implementations may ignore this argument

Implemented in reranker::DotProduct.


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