diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-09-05 16:29:09 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-09-05 16:30:35 +0100 |
| commit | 14ba9a1ef4fd4c0de418830626b07dff5c5b52d4 (patch) | |
| tree | e0daee115edaa14b6933c77c51aec62046ab56e2 | |
| parent | Change extension of readme (diff) | |
| download | AnnotateChange-14ba9a1ef4fd4c0de418830626b07dff5c5b52d4.tar.gz AnnotateChange-14ba9a1ef4fd4c0de418830626b07dff5c5b52d4.zip | |
Add implementation note on how missing values are handled
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | app/static/js/makeChart.js | 2 |
2 files changed, 11 insertions, 1 deletions
@@ -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 = []; |
