Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
|
An interface specifying a kernel function for two FeatureVector instances. More...
#include <kernel-function.H>
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... | |
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.
|
inlinevirtual |
Definition at line 52 of file kernel-function.H.
|
inlinevirtual |
Applies this kernel function to the specified feature vectors.
Definition at line 54 of file kernel-function.H.
|
pure virtual |
Applies this kernel function to the specified feature vectors.
fv1 | the first feature vector |
index1 | the training example index of the first feature vector, if known, or else -1; concrete implementations may ignore this argument |
fv2 | the second feature vector |
index2 | the training example index of the second feature vector, if known, or else -1; concrete implementations may ignore this argument |
Implemented in reranker::DotProduct.