You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2020/09/16 00:16:20 UTC

[incubator-datasketches-characterization] branch master updated: update ReqSketch char tests

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git


The following commit(s) were added to refs/heads/master by this push:
     new 63ec472  update ReqSketch char tests
63ec472 is described below

commit 63ec4723331f3f64e5c337fd062758653b86dea4
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Tue Sep 15 17:15:57 2020 -0700

    update ReqSketch char tests
---
 .../characterization/quantiles/ReqSketchAccuracyProfile.java     | 9 +++++----
 src/main/resources/quantiles/ReqFloatsSketchAccuracyJob.conf     | 6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java b/src/main/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
index 774658e..a154887 100644
--- a/src/main/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
+++ b/src/main/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
@@ -20,6 +20,7 @@
 package org.apache.datasketches.characterization.quantiles;
 
 import org.apache.datasketches.Properties;
+import org.apache.datasketches.req.Criteria;
 import org.apache.datasketches.req.ReqSketch;
 
 /**
@@ -34,11 +35,11 @@ public class ReqSketchAccuracyProfile extends BaseReqSketchAccuracyProfile {
   @Override
   void configure(final Properties props) {
     final int K = Integer.parseInt(job.getProperties().mustGet("K"));
-    final boolean lteq = Boolean.parseBoolean(job.getProperties().mustGet("lteq"));
+    final Criteria criterion = Criteria.valueOf(job.getProperties().mustGet("criterion"));
     final boolean hra = Boolean.parseBoolean(job.getProperties().mustGet("hra"));
     useBulk = Boolean.parseBoolean(job.getProperties().mustGet("useBulk"));
     sk = new ReqSketch(K, hra);
-    sk.setLtEq(lteq);
+    sk.setCriterion(criterion);
   }
 
   @Override
@@ -53,9 +54,9 @@ public class ReqSketchAccuracyProfile extends BaseReqSketchAccuracyProfile {
 
     final double[] rawRanks = sk.getRanks(evenlySpacedValues);
     final double[] re = new double[numEvenlySpaced];
-    //compute relative error
+    //compute error
     for (int i = 1; i < numEvenlySpaced; i++) {
-      re[i] = rawRanks[i] / evenlySpacedRanks[i] - 1.0;
+      re[i] = rawRanks[i] - evenlySpacedRanks[i];
     }
     sk.reset();
     return re;
diff --git a/src/main/resources/quantiles/ReqFloatsSketchAccuracyJob.conf b/src/main/resources/quantiles/ReqFloatsSketchAccuracyJob.conf
index ae62314..9830139 100644
--- a/src/main/resources/quantiles/ReqFloatsSketchAccuracyJob.conf
+++ b/src/main/resources/quantiles/ReqFloatsSketchAccuracyJob.conf
@@ -20,7 +20,7 @@ JobProfile=org.apache.datasketches.characterization.quantiles.ReqSketchAccuracyP
 # Trials config (indep of sketch)
 ## Stream lengths
 lgMin=11    # The starting stream length
-lgMax=17    # How high the stream length goes
+lgMax=11    # How high the stream length goes
 lgDelta=3   # If > 0, this is the lg Increment
 PPO=8       # The horizontal x-resolution of trials points
 
@@ -30,8 +30,8 @@ numEvenlySpaced=65 # num evenly spaced monotonic ranks in [0,1] for measuring th
 
 # Specific sketch config
 K=50 # sketch size and accuracy parameter for about 1% accuracy
-lteq=true # use <= instead of just <
-hra=true # use high-rank accuracy, otherwise low-rank accuracy
+criterion=LE # LT, LE, GT, GE, must be all caps
+hra=false # use high-rank accuracy, otherwise low-rank accuracy
 useBulk=true # use getRanks() instead of separate getRank() for each value
 
 # Date-Time Profile


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org