diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-03-12 16:02:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-03-12 16:02:01 +0100 |
commit | 16b17dd34a0c1602b7df842af3126d8bd4d4a042 (patch) | |
tree | 2e7d28a99a704cff6ee956fa6d067e8292d2d7ff /bin/analyze-archive.py | |
parent | 83bc676dd6247bca3bc1901401469d23f4768992 (diff) |
optional outlier handling... not sure if useful yet
Diffstat (limited to 'bin/analyze-archive.py')
-rwxr-xr-x | bin/analyze-archive.py | 10 |
1 files changed, 8 insertions, 2 deletions
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() |