Skip to content

Commit

Permalink
ENH: decide about showing warning based on id, not the message
Browse files Browse the repository at this point in the history
  • Loading branch information
nno committed May 8, 2017
1 parent a4265ec commit 0a8b24e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mvpa/cosmo_classify_matlabsvm_2class.m
Expand Up @@ -87,12 +87,14 @@

% deal with possible warning shown (Matlab >= 2016)
[warning_msg,warning_id]=lastwarn();
if strcmp(warning_msg,['svmtrain will be removed in a future '...
'release. Use fitcsvm instead.'])
if strcmp(warning_id,'stats:obsolete:ReplaceThisWith')
% only show warning once (by default) if this is a
% a stats:obsolete message
suffix=['CoSMoMVPA note: fitcsvm gives different results '...
'than svmtrain. Currently there is no support '...
suffix=['CoSMoMVPA note: the more recent '...
'fitcsvm / svmsmoset classifiers'...
'different results '...
'than the older svmtrain function. '...
'Currently there is no support '...
'in CoSMoMVPA for using fitcsvm in a '...
'classifier'];
cosmo_warning('%s\n%s',warning_msg,suffix);
Expand Down

0 comments on commit 0a8b24e

Please sign in to comment.