public class SequenceLearningKernelMain
extends Object
This class shows how to use a
SequenceClassificationLearningAlgorithm
. Given a dataset of
SequenceExample
s where each item in the sequence is represented
as a feature vector, the following code implements a kernel based learning
algorithm .
During the training step, each example is enriched with an additional
representation to consider the example history, in terms of classes assigned
to the previous example(s). The overall kernel function is thus a combination
of a kernel operating on the original representation and a kernel operating
on this additional representation.
During the tagging process, the history of an example is dynamically
estimated by a classifier and the entire sequence of labels is derived
through a Viterbi Decoding step combined with a Beam Search Strategy.
The datasets used in this example have been created starting from the dataset
produced by Thorsten Joachims as an example problem for his SVM^{hmm}
implementation.
The original dataset can be downloaded at:
http://download.joachims.org/svm_hmm/examples/example7.tar.gz
while its description is reported at:
https://www.cs.cornell.edu/people/tj/svm_light/svm_hmm.html
- Author:
- Danilo Croce