Skip to content

Commit

Permalink
fixed cafa_parse_config.m for taking preeval configure files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuxiang Jiang committed Apr 5, 2018
1 parent e62ce15 commit 54ea0a7
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions matlab/cafa_parse_config.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
elseif strcmp(parsed{1}, 'benchmark')
config.bm = pfp_loaditem(parsed{2}, 'char');
elseif strcmp(parsed{1}, 'annotation')
data = load(parsed{2});
data = load(parsed{2});
config.oa = data.oa;
config.eia = data.eia;
clear data;
Expand Down Expand Up @@ -174,8 +174,8 @@
files = dir(strcat(config.pred_dir, 'M*'));
models = union(models, regexprep({files.name}, '\..*', ''));
end
models = union(models, models_plus);
models = setdiff(models, models_minus);
models = union(models, models_plus);
models = setdiff(models, models_minus);
config.model = unique(models);

if ismember('none', models)
Expand All @@ -202,10 +202,15 @@
% }}}

% create result sub-dir {{{
sub_dir = sprintf('%s_%s_type%s_mode%s/', config.ont, config.cat, config.tp, config.md);
config.eval_dir = fullfile(config.eval_dir, sub_dir);
if ~exist(config.eval_dir, 'dir')
mkdir(config.eval_dir);
if isfield(config, 'tp') && isfield(config, 'md')
sub_dir = sprintf('%s_%s_type%s_mode%s/', config.ont, config.cat, config.tp, config.md);
end

if isfield(config, 'eval_dir') % not required by pre-evaluation
config.eval_dir = fullfile(config.eval_dir, sub_dir);
if ~exist(config.eval_dir, 'dir')
mkdir(config.eval_dir);
end
end
% }}}
return
Expand All @@ -214,4 +219,4 @@
% Yuxiang Jiang ([email protected])
% Department of Computer Science
% Indiana University, Bloomington
% Last modified: Tue 24 May 2016 12:20:53 PM E
% Last modified: Wed 04 Apr 2018 08:02:19 PM E

0 comments on commit 54ea0a7

Please sign in to comment.