% In this example a kernel matrix is computed for a given real-valued data set.
% The kernel used is the Chi2 kernel which operates on real-valued vectors. It
% computes the chi-squared distance between sets of histograms. It is a very
% useful distance in image recognition (used to detect objects). The preprocessor
% PruneVarSubMean substracts the mean from each feature and removes features that
% have zero variance.

% PruneVarSubMean
print PruneVarSubMean
add_preproc PRUNEVARSUBMEAN 1
set_kernel CHI2 REAL 10 1.4

set_features TRAIN ../data/fm_train_real.dat
attach_preproc TRAIN
km_train.txt = get_kernel_matrix TRAIN

set_features TEST ../data/fm_test_real.dat
attach_preproc TEST
km_test.txt = get_kernel_matrix TEST
