Skip to content

Commit

Permalink
fix svmlight based modular examples to use try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Oct 17, 2011
1 parent db0d2a4 commit 00fd1c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -8,7 +8,7 @@
fm_test_dna=load_matrix('../data/fm_test_dna.dat');

% svm light
if exist('SVMLight')
try
disp('SVMLight')

feats_train=StringCharFeatures(DNA);
Expand All @@ -31,6 +31,6 @@

kernel.init(feats_train, feats_test);
svm.apply().get_labels();
else
catch
disp('No support for SVMLight available.')
end
Expand Up @@ -5,8 +5,8 @@
fm_train=load_matrix('../data/fm_train_real.dat');
fm_test=load_matrix('../data/fm_test_real.dat');

% libsvm based support vector regression
if exist('SVRLight')
% svmlight based support vector regression
try
disp('SVRLight')

feats_train=RealFeatures(fm_train);
Expand All @@ -27,6 +27,6 @@

kernel.init(feats_train, feats_test);
svr.apply().get_labels();
else
catch
disp('No support for SVRLight available.')
end

0 comments on commit 00fd1c4

Please sign in to comment.