% The class TOPFeatures implements TOP kernel features obtained from
% two Hidden Markov models.
% 
% It was used in
% 
% K. Tsuda, M. Kawanabe, G. Raetsch, S. Sonnenburg, and K.R. Mueller. A new
% discriminative kernel from probabilistic models. Neural Computation,
% 14:2397-2414, 2002.
% 
% which also has the details.
% 
% Note that TOP-features are computed on the fly, so to be effective feature
% caching should be enabled.
% 
% It inherits its functionality from CSimpleFeatures, which should be
% consulted for further reference.
% 

% Plugin Estimate
print PluginEstimate w/ HistogramWord

set_features TRAIN ../data/fm_train_dna.dat DNA
convert TRAIN STRING CHAR STRING WORD 3 2 0 n

set_features TEST ../data/fm_test_dna.dat DNA
convert TEST STRING CHAR STRING WORD 3 2 0 n

new_plugin_estimator 1e-1 1e-1
set_labels TRAIN ../data/label_train_dna.dat
train_estimator

set_kernel HISTOGRAM WORD 10
km_train.txt = get_kernel_matrix TRAIN

% not supported yet;
%	lab.txt = plugin_estimate_classify
km_text.txt = get_kernel_matrix TEST
