X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/e26832c9e7be68fc16059f7a2d3c2478afbcfa91..e3d9c56514820753014ec6443abd553c0eb34dab:/src/minwii/loganalyse.py diff --git a/src/minwii/loganalyse.py b/src/minwii/loganalyse.py index d7e136f..03d0837 100755 --- a/src/minwii/loganalyse.py +++ b/src/minwii/loganalyse.py @@ -12,16 +12,16 @@ from minwii.musicxml import musicXml2Song from statlib import stats from datetime import timedelta -DEFAULT_STATS = ('geometricmean', - 'harmonicmean', - 'mean', - 'median', - 'medianscore', +DEFAULT_STATS = (#'geometricmean', + #'harmonicmean', + #'mean', + ('median', 'Médiane'), + #'medianscore', #'mode', - 'moment', - 'variation', - 'skew', - 'kurtosis', + #'moment', + ('variation', 'Variation'), + #'skew', + ('kurtosis', 'Kurtosis'), #'itemfreq', #'histogram', #'cumfreq', @@ -31,10 +31,12 @@ DEFAULT_STATS = ('geometricmean', def statsresults(m) : def computeList(self): l = m(self) - ret = {} - for name in DEFAULT_STATS : - ret[name] = getattr(stats, name)(l) - return ret + results = [] + for name, label in DEFAULT_STATS : + results.append('%s : %s' % (label, getattr(stats, name)(l))) + return '\n'.join(results) + computeList.__name__ = m.__name__ + computeList.__doc__ = m.__doc__ return computeList class LogFileAnalyser(LogFileReader) :