aboutsummaryrefslogtreecommitdiff
path: root/execs
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2020-05-25 13:47:18 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2020-05-25 14:19:58 +0100
commitf3b6797e3b4a2dd1be46d3c8c59b2d74d1a129bf (patch)
tree4854f6d68179f23264e1d8acc4c6e23fe382c16a /execs
parentDon't update pip in Dockerfile (diff)
downloadTCPDBench-f3b6797e3b4a2dd1be46d3c8c59b2d74d1a129bf.tar.gz
TCPDBench-f3b6797e3b4a2dd1be46d3c8c59b2d74d1a129bf.zip
Add the "zero" method
This method always returns that a series contains no change points.
Diffstat (limited to 'execs')
-rw-r--r--execs/python/cpdbench_zero.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/execs/python/cpdbench_zero.py b/execs/python/cpdbench_zero.py
new file mode 100644
index 00000000..951fa9ea
--- /dev/null
+++ b/execs/python/cpdbench_zero.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+A method that always returns no change points
+
+Author: G.J.J. van den Burg
+Date: 2020-05-07
+License: MIT
+Copyright: 2020, The Alan Turing Institute
+
+"""
+
+import argparse
+import time
+
+from cpdbench_utils import load_dataset, exit_success
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(description="Wrapper for None-detector")
+ parser.add_argument(
+ "-i", "--input", help="path to the input data file", required=True
+ )
+ parser.add_argument("-o", "--output", help="path to the output file")
+ return parser.parse_args()
+
+
+def main():
+ args = parse_args()
+
+ data, mat = load_dataset(args.input)
+
+ start_time = time.time()
+
+ locations = []
+
+ stop_time = time.time()
+ runtime = stop_time - start_time
+
+ exit_success(data, args, {}, locations, runtime, __file__)
+
+
+if __name__ == "__main__":
+ main()