Skip to content

Commit

Permalink
Updated stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Swathi Sheshadri authored and Swathi Sheshadri committed Aug 8, 2019
1 parent 4b4ea58 commit 32c114e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
36 changes: 27 additions & 9 deletions Codes/helper_functions/demo_DLC2d_plotter.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,37 @@
devbp = abs(reconbp(:) - groundtruth);
devavg = abs(reconavg(:) - groundtruth);

[H1,P1] = ttest2(devall,devbp,'tail','left');
disp('Results from statistical tests :')
if H1 == 1 && P1 <= 0.05
disp('Deviations from true edge length smaller when using all cameras than best two')
[p,tbl,stats] = kruskalwallis([devall,devbp,devavg],[],'off');
[c,m,h] = multcompare(stats,[],'off');

pval_allvsbp = c(1,6); % 6th column returned by multcompare function holds p value
meandiff_allvsbp = c(1,4); % 4th column returned hold difference in mean between all and avg modes

pval_allvsavg = c(2,6); % 6th column returned by multcompare function holds p value
meandiff_allvsavg = c(2,4); % 4th column returned hold difference in mean between all and avg modes

if pval_allvsbp < 0.001 && meandiff_allvsbp < 0
disp(['Deviations from true edge length is on average significantly smaller (p < ' num2str(0.001) ') when using all cameras than when using best pair'])
end

[H2,P2] = ttest2(devall,devavg,'tail','left');
if H2 == 1 && P2 <= 0.05
disp('Deviations from true edge length smaller when using all cameras than average over pairs')
if pval_allvsavg < 0.001 && meandiff_allvsavg < 0
disp(['Deviations from true edge length is on average significantly smaller (p < ' num2str(0.001) ') when using all cameras than when averaging over pairs'])
end


% [H1,P1] = ttest2(devall,devbp,'tail','left');
% disp('Results from statistical tests :')
% if H1 == 1 && P1 <= 0.05
% disp('Deviations from true edge length smaller when using all cameras than best two')
% end
%
% [H2,P2] = ttest2(devall,devavg,'tail','left');
% if H2 == 1 && P2 <= 0.05
% disp('Deviations from true edge length smaller when using all cameras than average over pairs')
% end



%% Vizualization
%setting maximum and minimum of axis of visualization
xvals = coords3d(:,1:3:nfeatures*3,1);
Expand Down Expand Up @@ -193,8 +213,6 @@
end
end
end

else

end

Expand Down
13 changes: 7 additions & 6 deletions Codes/helper_functions/demo_other2d_plotter.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@
devall = abs(reconall(:) - groundtruth);
devavg = abs(reconavg(:) - groundtruth);

[H1,P1] = ttest2(devall,devavg,'tail','left');
if H1 == 1 && P1 <= 0.05
disp('Deviations from true edge length smaller when using all cameras than average over pairs')
end
[p,tbl,stats] = kruskalwallis([devall,devavg],[],'off');
[c,m,h] = multcompare(stats,[],'off');
pval_allvsavg = c(1,6); % 6th column returned by multcompare function holds p value
meandiff_allvsavg = c(1,4); % 4th column returned hold difference in mean between all and avg modes

if pval_allvsavg < 0.001 && meandiff_allvsavg < 0
disp(['Deviations from true edge length is on average significantly smaller (p < ' num2str(0.001) ') when using all cameras than when averaging over pairs'])
end

%setting maximum and minimum of axis of visualization
xvals = coords3d(:,1:3:nfeatures*3,1);
Expand Down Expand Up @@ -134,8 +137,6 @@
end
end
end

else

end

Expand Down

0 comments on commit 32c114e

Please sign in to comment.