aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-09-05 16:29:09 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-09-05 16:30:35 +0100
commit14ba9a1ef4fd4c0de418830626b07dff5c5b52d4 (patch)
treee0daee115edaa14b6933c77c51aec62046ab56e2
parentChange extension of readme (diff)
downloadAnnotateChange-14ba9a1ef4fd4c0de418830626b07dff5c5b52d4.tar.gz
AnnotateChange-14ba9a1ef4fd4c0de418830626b07dff5c5b52d4.zip
Add implementation note on how missing values are handled
-rw-r--r--README.md10
-rw-r--r--app/static/js/makeChart.js2
2 files changed, 11 insertions, 1 deletions
diff --git a/README.md b/README.md
index e69de29..ace1265 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,10 @@
+# AnnotateChange
+
+## Implementation Notes
+
+* Missing values are skipped, so that gaps occur in the graph. X-values are
+ however counted continuously, to ensure that this gap has nonzero width.
+ Thus, when a change point is selected by an annotator after such a gap, its
+ location can be found by retrieving the observation at the index *while
+ including missing values*. This is in contrast to the approach where missing
+ values are removed before the index is used to retrieve the data point.
diff --git a/app/static/js/makeChart.js b/app/static/js/makeChart.js
index 7004dc8..7049d8f 100644
--- a/app/static/js/makeChart.js
+++ b/app/static/js/makeChart.js
@@ -8,7 +8,7 @@ function preprocessData(data) {
for (i=0; i<data.values[0].raw.length; i++) {
d = data.values[0].raw[i];
if (isNaN(d)) {
- n++;
+ n++; // keep counting!
if (run.length > 0)
cleanData.push(run);
run = [];