# HG changeset patch # User Christopher Hummersone # Date 1490790046 -3600 # Node ID 9c2d361e5d42f44779da3f00a9b1ce178ca96798 # Parent ba256926c559eabde0d9bb52cc4aacd2d94510e9 Merged ‘develop’. - Updated submodule. - MASSEFresults: Corrected table output when performing aggregating functions. Added boxPlot() method to automatically plot performance data for each algorithm/estimate. - MASSEF: iosr.install has been moved to install method. Clear mixture cache before saving in order to reduce file size. diff -r ba256926c559 -r 9c2d361e5d42 .hgsubstate --- a/.hgsubstate Wed Mar 29 09:31:12 2017 +0100 +++ b/.hgsubstate Wed Mar 29 13:20:46 2017 +0100 @@ -1,1 +1,1 @@ -b98b6559c275b487a42c62b1cc32c92c31147e4e Library +5eb5d21bd3da71ce11ef0e46fc9b3437afcb47a5 Library diff -r ba256926c559 -r 9c2d361e5d42 MASSEF.m --- a/MASSEF.m Wed Mar 29 09:31:12 2017 +0100 +++ b/MASSEF.m Wed Mar 29 13:20:46 2017 +0100 @@ -403,6 +403,7 @@ 'target_ele', mixtures(n).target.elevation, ... 'tir', mixtures(n).tir ... ); + mixtures(n).clearCache(); end obj.save(); @@ -561,7 +562,6 @@ SOFAstart(0); amtstart; - iosr.install; d = pwd; cd([MASSEF.dir filesep 'help_html' filesep 'source']) diff -r ba256926c559 -r 9c2d361e5d42 MASSEFresults.m --- a/MASSEFresults.m Wed Mar 29 09:31:12 2017 +0100 +++ b/MASSEFresults.m Wed Mar 29 13:20:46 2017 +0100 @@ -35,6 +35,8 @@ % MASSEFRESULTS methods: % MASSEFresults - Create a MASSEFresults object. % algorithmInfo - Add algorithm information. +% boxPlot - Analyse the results data by plotting notched +% box plots. % filter - Filter the results set. % input - Add performance data. % merge - Combine results array into singular object. @@ -304,6 +306,33 @@ end + function bph = boxPlot(obj) + %BOXPLOT Analyse the results data by plotting notched box plots + % + % R.BOXPLOT() produces a series of box plots, one for each + % metric, plotting the performance of each algorithms/estimate + % aggregated across all mixtures. + % + % BPH = R.BOXPLOT() returns an array of IOSR.STATISTICS.BOXPLOT + % objects BPH for the plots. + + for m = numel(obj.metrics):-1:1 + + tabData = obj.filter('metric', @(x) strcmp(x, obj.metrics{m}), 'channel', 'max'); + tabData.name = strcat(tabData.algorithmLabel, ':', {' '}, tabData.estTag); + + [y, x] = iosr.statistics.tab2box(tabData.name, tabData.value); + + figure + bph(m) = iosr.statistics.boxPlot(x, y, 'notch', true); + ylabel(obj.metrics{m}) + xlabel('Algorithm') + box on + + end + + end + end % public methods methods (Hidden) @@ -331,15 +360,16 @@ end % do stats try - dataTable = varfun(fhandle,dataTable,'InputVariables','value',... + filteredTable = varfun(fhandle,dataTable,'InputVariables','value',... 'GroupingVariables',group); catch - dataTable = varfun(fhandle,dataTable,'InputVariables','value',... + filteredTable = varfun(fhandle,dataTable,'InputVariables','value',... 'GroupingVariables',altgroup); end % rename value column and delete GroupCount column - dataTable = obj.findRenameVar(dataTable,'value','value'); - dataTable.GroupCount = []; + filteredTable = obj.findRenameVar(filteredTable,'value','value'); + filteredTable.GroupCount = []; + dataTable = join(filteredTable, dataTable); else % normal filter function dataTable = obj.filterRows(dataTable,filterval,col);