From 16b17dd34a0c1602b7df842af3126d8bd4d4a042 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 12 Mar 2018 16:02:01 +0100 Subject: optional outlier handling... not sure if useful yet --- bin/analyze-archive.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bin/analyze-archive.py') diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index e3a44bf..a9ef3bc 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -40,10 +40,11 @@ def model_quality_table(result_lists, info_list): if __name__ == '__main__': ignored_trace_indexes = None + discard_outliers = None try: raw_opts, args = getopt.getopt(sys.argv[1:], "", - 'plot ignored-trace-indexes='.split(' ')) + 'plot ignored-trace-indexes= discard-outliers='.split(' ')) for option, parameter in raw_opts: optname = re.sub(r'^--', '', option) @@ -54,6 +55,9 @@ if __name__ == '__main__': if 0 in ignored_trace_indexes: print('[E] arguments to --ignored-trace-indexes start from 1') + if 'discard-outliers' in opts: + discard_outliers = float(opts['discard-outliers']) + except getopt.GetoptError as err: print(err) sys.exit(2) @@ -61,7 +65,9 @@ if __name__ == '__main__': raw_data = RawData(args) preprocessed_data = raw_data.get_preprocessed_data() - model = EnergyModel(preprocessed_data, ignore_trace_indexes = ignored_trace_indexes) + model = EnergyModel(preprocessed_data, + ignore_trace_indexes = ignored_trace_indexes, + discard_outliers = discard_outliers) print('--- simple static model ---') static_model = model.get_static() -- cgit v1.2.3