in src/main/java/org/apache/datasketches/characterization/kll/KllItemsSketchWeightedRankGaussianAccuracyProfile.java [175:197]
void doTrial() {
Shuffle.shuffle(qStatsArr);
if (weightedUpdate) {
for (int i = 0; i < numSteps; i++) {
sk.update(qStatsArr[i].strValue, stepSize);
}
} else { //single
for (int i = 0; i < numSteps; i++) {
for (int j = 0; j < stepSize; j++) {
sk.update(qStatsArr[i].strValue);
}
}
}
//get estimated ranks from sketch for all steps
double estNormalizedRank;
for (int i = 0; i < numSteps; i++) {
qStatsArr[i].estNormRank = estNormalizedRank = sk.getRank(qStatsArr[i].strValue, criteria);
final double errorAtPlotPoint = estNormalizedRank - qStatsArr[i].normRank;
qStatsArr[i].qsk.update(errorAtPlotPoint); //update each of the errQArr sketches
}
}