-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiple_comparisons.m
More file actions
31 lines (28 loc) · 1.13 KB
/
multiple_comparisons.m
File metadata and controls
31 lines (28 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
clear; clc; close all;
if ispc
disp('TODO: add paths for windows machine.');
disp('Terminating script.'); return;
else
path_in = '/Users/gabriellamelki/Documents/Research/MultiInstanceLearning/WekaTesting/stats/';
path_out = '/Users/gabriellamelki/Documents/Research/MultiInstanceLearning/WekaTesting/stats/';
end
metrics = {'Accuracy','Precision','Recall','Kappa','AUC','Time'};
%metrics = {'accuracy'};
num_metrics = length(metrics);
alpha = 0.1;
% initialize using Accuracy.csv
T = readtable([path_in metrics{1} '_pVal.csv']);
% get algorithm names
algorithms = {'MIRSVM vs.'};
algorithms(2:size(T(:,1),1)+1) = table2cell(T(:,1));
num_algorithms = length(algorithms);
% get dataset names + latex table row names
methods = {'Nemenyi $p$-value', 'Holm $p$-value', 'Shaffer $p$-value'};
for m = 1:num_metrics
% get data
T = readtable([path_in metrics{m} '_pVal.csv']);
data = T{:,2:end}';
disp(['Analyzing ' metrics{m}]);
% create latex table
matrix2latex_metrics(data, [path_out [metrics{m} '_pV.tex']], 'rowLabels', methods, 'columnLabels', algorithms, 'alignment', 'c', 'format', '%1.4f', 'rank', 'no');
end