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/22 01:17:16 UTC
[incubator-datasketches-characterization] branch master updated:
update profile
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 e0606bf update profile
e0606bf is described below
commit e0606bfd8aaf69ae10b894cd539173630053a196
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Mon Sep 21 18:12:37 2020 -0700
update profile
---
.../quantiles/ReqSketchAccuracyProfile.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 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 a0c6b4a..3d711ff 100644
--- a/src/main/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
+++ b/src/main/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
@@ -55,7 +55,7 @@ public class ReqSketchAccuracyProfile implements JobProfile {
private double exponent;
private final String sFmt = "%3s\t%5s\t%4s\t%4s\t%4s\t%5s\t%4s\t%4s\n";
- private final String fFmt = "%3d\t%12.0f\t%12.4f\t%12.7f\t%12.7f\t%12.7f\t%12.7f\t%12.7f\n";
+ private final String fFmt = "%12.7f\t%12.0f\t%12.7f\t%12.7f\t%12.7f\t%12.7f\t%12.7f\t%12.7f\n";
//Target sketch configuration & error analysis
private int K;
@@ -122,7 +122,7 @@ public class ReqSketchAccuracyProfile implements JobProfile {
}
void configureSketch() {
- sk = new ReqSketch(K, hra);
+ sk = ReqSketch.builder().setK(K).setHighRankAccuracy(hra).build();
sk.setCriterion(criterion);
}
@@ -157,7 +157,7 @@ public class ReqSketchAccuracyProfile implements JobProfile {
void doStreamLength(final int streamLength) {
//print at the top of each stream length
job.println(LS + "Stream Length: " + streamLength );
- job.printf(sFmt, "PP", "Value", "Rank", "-2SD", "-1SD", "Med", "+1SD", "+2SD");
+ job.printf(sFmt, "rPP", "Value", "Rank", "-2SD", "-1SD", "Med", "+1SD", "+2SD");
//build the stream
//the values themselves reflect their integer ranks starting with 1.
@@ -177,14 +177,15 @@ public class ReqSketchAccuracyProfile implements JobProfile {
//at this point each of the errQSkArr sketches has a distribution of error from numTrials
for (int pp = 0 ; pp < numPlotPoints; pp++) {
- final double v = trueValues[pp]; //the true values
- final double r = v / streamLength; //the true rank
+ final double v = trueValues[pp];
+ final double tr = v / streamLength; //the true rank
//for each of the numErrDistRanks distributions extract the sd quantiles
final double[] errQ = errQSkArr[pp].getQuantiles(gRanks); //get error values at the Gaussian ranks
//Plot the row. We ignore quantiles collected at 0 and 1.0.
- job.printf(fFmt, pp + 1, v, r, errQ[0], errQ[1], errQ[2], errQ[3], errQ[4]);
+ final double relPP = (double)(pp + 1) / numPlotPoints;
+ job.printf(fFmt, relPP, v, tr, errQ[0], errQ[1], errQ[2], errQ[3], errQ[4]);
errQSkArr[pp].reset(); //reset the errQSkArr for next streamLength
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org