This is an automated email from the ASF dual-hosted git repository.
leirui pushed a commit to branch research/M4-visualization
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/research/M4-visualization by
this push:
new ddbc093fc2 polish
ddbc093fc2 is described below
commit ddbc093fc21d4202335d60184c33e10bcabd45c3
Author: Lei Rui <[email protected]>
AuthorDate: Wed Apr 12 21:46:07 2023 +0800
polish
---
.../apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
index ed9ead7a1f..21443bfcc2 100644
---
a/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
+++
b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StepRegress.java
@@ -27,6 +27,8 @@ import java.util.Arrays;
public class StepRegress {
+ public static boolean useMad = false;
+
// this is necessary, otherwise serialized twice by timeseriesMetadata and
chunkMetadata
// causing learn() executed more than once!!
private boolean isLearned = false;
@@ -332,7 +334,11 @@ public class StepRegress {
private boolean isBigInterval(long interval) {
int bigIntervalParam = 3;
- return interval > this.mean + bigIntervalParam * this.stdDev;
+ if (!useMad) {
+ return interval > this.mean + bigIntervalParam * this.stdDev;
+ } else {
+ return interval > this.median + bigIntervalParam * this.mad;
+ }
}
public double getMedian() {