% The Weighted Degree String kernel.
% 
% The WD kernel of order d compares two sequences X and
% Y of length L by summing all contributions of k-mer matches of
% lengths k in 1...d , weighted by coefficients beta_k. It
% is defined as
% 
%     k(X, Y)=\sum_{k=1}^d\beta_k\sum_{l=1}^{L-k+1}I(u_{k,l}(X)=u_{k,l}(Y)).
% 
% Here, $u_{k,l}(X)$ is the string of length k starting at position
% l of the sequence X and I(.) is the indicator function
% which evaluates to 1 when its argument is true and to 0
% otherwise.
% 

% Weighted Degree String
print WeightedDegreeString
set_kernel WEIGHTEDDEGREE CHAR 10 20

set_features TRAIN ../data/fm_train_dna.dat DNA
km_train.txt = get_kernel_matrix TRAIN

set_features TEST ../data/fm_test_dna.dat DNA
km_test.txt = get_kernel_matrix TEST
