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 e7e2731  Remove test data, update profiles & config
e7e2731 is described below

commit e7e2731c84aa01ac519dc2ac8de4e4278ab783e5
Author: Lee Rhodes <[email protected]>
AuthorDate: Fri Oct 23 09:58:33 2020 -0700

    Remove test data, update profiles & config
---
 ...etchAccuracyProfile20201017_150706GMT-07:00.tsv | 101 ----------------
 .../resources/quantiles/ReqSketchAccuracyJob.conf  |  15 ++-
 .../quantiles/ReqSketchAccuracyProfile.java        | 131 +++++++++++++--------
 .../quantiles/ReqSketchAccuracyProfile2.java       |  14 ++-
 .../characterization/quantiles/TrueRanks.java      |  10 +-
 5 files changed, 102 insertions(+), 169 deletions(-)

diff --git a/ReqSketchAccuracyProfile20201017_150706GMT-07:00.tsv 
b/ReqSketchAccuracyProfile20201017_150706GMT-07:00.tsv
deleted file mode 100644
index 02b2599..0000000
--- a/ReqSketchAccuracyProfile20201017_150706GMT-07:00.tsv
+++ /dev/null
@@ -1,101 +0,0 @@
-nPP    Value   Rank    -3SD    -2SD    -1SD      Med   +1SD    +2SD    +3SD    
1LB     1UB       U
-  0.0100000000              1    0.0000009537    0.0000000000    0.0000000000  
  0.0000000000    0.0000000000    0.0000000000    0.0000000000    0.0000000000  
  0.0000000000    0.0000000000       1
-  0.0200000000          10593    0.0101022720   -0.0003376007   -0.0002298355  
 -0.0001115799    0.0000000000    0.0001182556    0.0002326965    0.0003099442  
 -0.0001099796    0.0001099796     587
-  0.0300000000          21184    0.0202026367   -0.0006723404   -0.0004587173  
 -0.0002279282    0.0000000000    0.0002260208    0.0004730225    0.0006990433  
 -0.0002199385    0.0002199385    1048
-  0.0400000000          31776    0.0303039551   -0.0010519028   -0.0006914139  
 -0.0003414154   -0.0000009537    0.0003366470    0.0006771088    0.0011110306  
 -0.0003299077    0.0003299077    1342
-  0.0500000000          42368    0.0404052734   -0.0013742447   -0.0009174347  
 -0.0004749298    0.0000114441    0.0004692078    0.0009489059    0.0014467239  
 -0.0004398769    0.0004398769    1659
-  0.0600000000          52959    0.0505056381   -0.0017271042   -0.0011863708  
 -0.0006237030   -0.0000066757    0.0006017685    0.0012187958    0.0018615723  
 -0.0005498357    0.0005498357    1576
-  0.0700000000          63551    0.0606069565   -0.0020370483   -0.0013828278  
 -0.0007638931    0.0000782013    0.0006942749    0.0015516281    0.0021581650  
 -0.0006598050    0.0006598050    1687
-  0.0800000000          74143    0.0707082748   -0.0026826859   -0.0017051697  
 -0.0008373260   -0.0000658035    0.0008630753    0.0017852783    0.0024528503  
 -0.0007697742    0.0007697742    1927
-  0.0900000000          84734    0.0808086395   -0.0028734207   -0.0019569397  
 -0.0009860992   -0.0000057220    0.0009784698    0.0019550323    0.0029201508  
 -0.0008797330    0.0008797330    2118
-  0.1000000000          95326    0.0909099579   -0.0030708313   -0.0020303726  
 -0.0010013580    0.0000181198    0.0010623932    0.0020532608    0.0029850006  
 -0.0009897023    0.0009897023    2243
-  0.1100000000         105918    0.1010112762   -0.0032720566   -0.0022954941  
 -0.0011425018    0.0000066757    0.0011377335    0.0022811890    0.0032606125  
 -0.0010996715    0.0010996715    2370
-  0.1200000000         116509    0.1111116409   -0.0034561157   -0.0024337769  
 -0.0012159348   -0.0000457764    0.0012159348    0.0024490356    0.0038490295  
 -0.0012096303    0.0012096303    2566
-  0.1300000000         127101    0.1212129593   -0.0037927628   -0.0026264191  
 -0.0013475418   -0.0000143051    0.0013217926    0.0026836395    0.0037117004  
 -0.0013195996    0.0013195996    2646
-  0.1400000000         137693    0.1313142776   -0.0042324066   -0.0028915405  
 -0.0014743805   -0.0000095367    0.0014591217    0.0029220581    0.0043764114  
 -0.0014295688    0.0014295688    2772
-  0.1500000000         148284    0.1414146423   -0.0042409897   -0.0030689240  
 -0.0015058517   -0.0000457764    0.0014677048    0.0030813217    0.0044250488  
 -0.0015395276    0.0015395276    2831
-  0.1600000000         158876    0.1515159607   -0.0047473907   -0.0032358170  
 -0.0016288757   -0.0000228882    0.0016098022    0.0032453537    0.0047578812  
 -0.0016494969    0.0016494969    2907
-  0.1700000000         169468    0.1616172791   -0.0049343109   -0.0034151077  
 -0.0017585754   -0.0000238419    0.0017290115    0.0034046173    0.0052385330  
 -0.0017594661    0.0017594661    2955
-  0.1800000000         180059    0.1717176437   -0.0054664612   -0.0035562515  
 -0.0017547607    0.0000104904    0.0017461777    0.0033731461    0.0047931671  
 -0.0018694249    0.0018694249    2956
-  0.1900000000         190651    0.1818189621   -0.0054302216   -0.0039014816  
 -0.0018920898    0.0001239777    0.0020074844    0.0039253235    0.0056362152  
 -0.0019793941    0.0019793941    3033
-  0.2000000000         201243    0.1919202805   -0.0060787201   -0.0038414001  
 -0.0020360947   -0.0001888275    0.0018348694    0.0038642883    0.0060672760  
 -0.0020893634    0.0020893634    2978
-  0.2100000000         211834    0.2020206451   -0.0061521530   -0.0039396286  
 -0.0020217896    0.0000123978    0.0021009445    0.0042686462    0.0058393478  
 -0.0021993222    0.0021993222    3089
-  0.2200000000         222426    0.2121219635   -0.0062484741   -0.0040369034  
 -0.0021715164   -0.0000934601    0.0020847321    0.0042963028    0.0063943863  
 -0.0023092914    0.0023092914    3061
-  0.2300000000         233018    0.2222232819   -0.0064811707   -0.0044050217  
 -0.0023021698   -0.0000581741    0.0021591187    0.0045108795    0.0076112747  
 -0.0024192607    0.0024192607    3003
-  0.2400000000         243609    0.2323236465   -0.0074129105   -0.0050764084  
 -0.0025100708    0.0000362396    0.0024623871    0.0047760010    0.0067558289  
 -0.0025292195    0.0025292195    3106
-  0.2500000000         254201    0.2424249649   -0.0072669983   -0.0048580170  
 -0.0024681091   -0.0000553131    0.0022773743    0.0046405792    0.0064601898  
 -0.0026391887    0.0026391887    2982
-  0.2600000000         264793    0.2525262833   -0.0072584152   -0.0047626495  
 -0.0023956299   -0.0000362396    0.0024385452    0.0046758652    0.0085000992  
 -0.0027491580    0.0027491580    3062
-  0.2700000000         275384    0.2626266479   -0.0076112747   -0.0054588318  
 -0.0020217896   -0.0004768372    0.0032415390    0.0047340393    0.0080204010  
 -0.0028591168    0.0028591168    2839
-  0.2800000000         285976    0.2727279663   -0.0075035095   -0.0060262680  
 -0.0023298264   -0.0006523132    0.0025711060    0.0059881210    0.0073041916  
 -0.0029690860    0.0029690860    2811
-  0.2900000000         296568    0.2828292847   -0.0082340240   -0.0064001083  
 -0.0031023026    0.0005626678    0.0020751953    0.0056581497    0.0091133118  
 -0.0030790553    0.0030790553    2841
-  0.3000000000         307159    0.2929296494   -0.0088205338   -0.0050907135  
 -0.0036478043   -0.0001831055    0.0034627914    0.0049209595    0.0088453293  
 -0.0031890141    0.0031890141    2763
-  0.3100000000         317751    0.3030309677   -0.0090875626   -0.0058555603  
 -0.0021963120   -0.0007705688    0.0029048920    0.0065441132    0.0080776215  
 -0.0032989833    0.0032989833    2800
-  0.3200000000         328343    0.3131322861   -0.0078449249   -0.0064172745  
 -0.0028190613    0.0006837845    0.0022115707    0.0058069229    0.0075397491  
 -0.0034089525    0.0034089525    2717
-  0.3300000000         338934    0.3232326508   -0.0086812973   -0.0050926208  
 -0.0035381317    0.0001468658    0.0035362244    0.0052261353    0.0091276169  
 -0.0035189114    0.0035189114    2835
-  0.3400000000         349526    0.3333339691   -0.0092000961   -0.0055971146  
 -0.0026216507   -0.0004730225    0.0032405853    0.0066204071    0.0084362030  
 -0.0036288806    0.0036288806    2849
-  0.3500000000         360118    0.3434352875   -0.0095653534   -0.0063762665  
 -0.0026187897    0.0004892349    0.0024719238    0.0062808990    0.0097446442  
 -0.0037388498    0.0037388498    2809
-  0.3600000000         370709    0.3535356522   -0.0083780289   -0.0066347122  
 -0.0032739639    0.0003976822    0.0021829605    0.0055122375    0.0091743469  
 -0.0038488087    0.0038488087    2841
-  0.3700000000         381301    0.3636369705   -0.0086536407   -0.0054616928  
 -0.0036048889   -0.0003185272    0.0033264160    0.0051183701    0.0084877014  
 -0.0039587779    0.0039587779    2885
-  0.3800000000         391893    0.3737382889   -0.0092220306   -0.0060415268  
 -0.0023593903   -0.0008354187    0.0027761459    0.0064477921    0.0083570480  
 -0.0040687471    0.0040687471    2803
-  0.3900000000         402484    0.3838386536   -0.0083808899   -0.0065364838  
 -0.0029630661    0.0006713867    0.0022344589    0.0058469772    0.0095567703  
 -0.0041787060    0.0041787060    2758
-  0.4000000000         413076    0.3939399719   -0.0088996887   -0.0052185059  
 -0.0036926270   -0.0000219345    0.0036783218    0.0051498413    0.0084838867  
 -0.0042886752    0.0042886752    2819
-  0.4100000000         423668    0.4040412903   -0.0095643997   -0.0059070587  
 -0.0025205612   -0.0006294250    0.0030422211    0.0065155029    0.0077610016  
 -0.0043986444    0.0043986444    2891
-  0.4200000000         434259    0.4141416550   -0.0093793869   -0.0065040588  
 -0.0028438568    0.0006523132    0.0023555756    0.0060033798    0.0098695755  
 -0.0045086033    0.0045086033    2840
-  0.4300000000         444851    0.4242429733   -0.0087423325   -0.0065402985  
 -0.0034084320    0.0002708435    0.0036783218    0.0054388046    0.0088396072  
 -0.0046185725    0.0046185725    2775
-  0.4400000000         455443    0.4343442917   -0.0090312958   -0.0054521561  
 -0.0032539368   -0.0004577637    0.0033607483    0.0068073273    0.0083026886  
 -0.0047285417    0.0047285417    2782
-  0.4500000000         466034    0.4444446564   -0.0093717575   -0.0062589645  
 -0.0025463104   -0.0002908707    0.0026760101    0.0064744949    0.0085830688  
 -0.0048385006    0.0048385006    2931
-  0.4600000000         476626    0.4545459747   -0.0088844299   -0.0067901611  
 -0.0033073425    0.0005474091    0.0037021637    0.0058708191    0.0096759796  
 -0.0049484698    0.0049484698    2914
-  0.4700000000         487218    0.4646472931   -0.0090312958   -0.0070743561  
 -0.0040225983   -0.0002107620    0.0036754608    0.0075387955    0.0097522736  
 -0.0050000000    0.0050000000    2910
-  0.4800000000         497809    0.4747476578   -0.0100631714   -0.0063705444  
 -0.0027427673   -0.0005741119    0.0031204224    0.0068635941    0.0097942352  
 -0.0050000000    0.0050000000    2993
-  0.4900000000         508401    0.4848489761   -0.0110645294   -0.0071296692  
 -0.0032510757    0.0006160736    0.0030803680    0.0064544678    0.0097208023  
 -0.0050000000    0.0050000000    3054
-  0.5000000000         518993    0.4949502945   -0.0091686249   -0.0072345734  
 -0.0040321350   -0.0001268387    0.0037956238    0.0073537827    0.0095729828  
 -0.0050000000    0.0050000000    2967
-  0.5100000000         529584    0.5050506592   -0.0099849701   -0.0065364838  
 -0.0041160583   -0.0004625320    0.0034332275    0.0073223114    0.0102958679  
 -0.0050000000    0.0050000000    2827
-  0.5200000000         540176    0.5151519775   -0.0113344193   -0.0068445206  
 -0.0032138824    0.0004549026    0.0030765533    0.0065355301    0.0102186203  
 -0.0050000000    0.0050000000    2917
-  0.5300000000         550768    0.5252532959   -0.0113067627   -0.0076122284  
 -0.0037155151    0.0002460480    0.0040788651    0.0072164536    0.0099735260  
 -0.0050000000    0.0050000000    2873
-  0.5400000000         561359    0.5353536606   -0.0098285675   -0.0067691803  
 -0.0039672852   -0.0001478195    0.0038080215    0.0072145462    0.0108690262  
 -0.0050000000    0.0050000000    2924
-  0.5500000000         571951    0.5454549789   -0.0100450516   -0.0067396164  
 -0.0029306412   -0.0006875992    0.0029506683    0.0068569183    0.0107269287  
 -0.0050000000    0.0050000000    2766
-  0.5600000000         582543    0.5555562973   -0.0109968185   -0.0071477890  
 -0.0032310486    0.0006713867    0.0036439896    0.0064983368    0.0104293823  
 -0.0050000000    0.0050000000    2859
-  0.5700000000         593134    0.5656566620   -0.0102777481   -0.0074682236  
 -0.0041780472   -0.0002231598    0.0036754608    0.0074539185    0.0097684860  
 -0.0050000000    0.0050000000    2879
-  0.5800000000         603726    0.5757579803   -0.0101919174   -0.0065040588  
 -0.0036163330   -0.0004835129    0.0033226013    0.0073432922    0.0110740662  
 -0.0050000000    0.0050000000    2920
-  0.5900000000         614318    0.5858592987   -0.0106620789   -0.0068063736  
 -0.0031013489    0.0005416870    0.0034437180    0.0064888000    0.0105333328  
 -0.0050000000    0.0050000000    2998
-  0.6000000000         624909    0.5959596634   -0.0090961456   -0.0076122284  
 -0.0036878586    0.0001955032    0.0040264130    0.0077581406    0.0100116730  
 -0.0050000000    0.0050000000    2903
-  0.6100000000         635501    0.6060609818   -0.0096006393   -0.0062141418  
 -0.0039854050   -0.0001316071    0.0035943985    0.0076417923    0.0109462738  
 -0.0050000000    0.0050000000    2956
-  0.6200000000         646093    0.6161623001   -0.0101470947   -0.0069732666  
 -0.0030384064   -0.0001373291    0.0030155182    0.0067510605    0.0106277466  
 -0.0050000000    0.0050000000    2875
-  0.6300000000         656684    0.6262626648   -0.0101737976   -0.0072851181  
 -0.0033960342    0.0005006790    0.0041694641    0.0075597763    0.0102806091  
 -0.0050000000    0.0050000000    2973
-  0.6400000000         667276    0.6363639832   -0.0102624893   -0.0078191757  
 -0.0041694641   -0.0002756119    0.0036201477    0.0073566437    0.0104446411  
 -0.0050000000    0.0050000000    2894
-  0.6500000000         677868    0.6464653015   -0.0103454590   -0.0066490173  
 -0.0032358170   -0.0005655289    0.0031452179    0.0071964264    0.0111856461  
 -0.0050000000    0.0050000000    2923
-  0.6600000000         688459    0.6565656662   -0.0106563568   -0.0070304871  
 -0.0033264160    0.0004129410    0.0042304993    0.0061941147    0.0099420547  
 -0.0050000000    0.0050000000    2616
-  0.6700000000         699051    0.6666669846   -0.0099296570   -0.0058908463  
 -0.0045433044   -0.0006704330    0.0032300949    0.0071430206    0.0110454559  
 -0.0050000000    0.0050000000    2426
-  0.6800000000         709643    0.6767683029   -0.0105876923   -0.0069322586  
 -0.0030326843    0.0008859634    0.0046472549    0.0061035156    0.0098295212  
 -0.0050000000    0.0050000000    2412
-  0.6900000000         720234    0.6868686676   -0.0125398636   -0.0079383850  
 -0.0042362213   -0.0003366470    0.0035734177    0.0074615479    0.0105371475  
 -0.0050000000    0.0050000000    2383
-  0.7000000000         730826    0.6969699860   -0.0105123520   -0.0071926117  
 -0.0033121109    0.0006074905    0.0044651031    0.0057783127    0.0095930099  
 -0.0050000000    0.0050000000    2268
-  0.7100000000         741418    0.7070713043   -0.0094966888   -0.0080146790  
 -0.0043554306   -0.0004625320    0.0034494400    0.0073585510    0.0113353729  
 -0.0050000000    0.0050000000    2335
-  0.7200000000         752009    0.7171716690   -0.0112724304   -0.0073280334  
 -0.0032539368    0.0005264282    0.0043516159    0.0077257156    0.0095062256  
 -0.0050000000    0.0050000000    2281
-  0.7300000000         762601    0.7272729874   -0.0098724365   -0.0060510635  
 -0.0045938492   -0.0007715225    0.0031509399    0.0072164536    0.0138654709  
 -0.0050000000    0.0050000000    2297
-  0.7400000000         773193    0.7373743057   -0.0108766556   -0.0071973801  
 -0.0038671494   -0.0017032623    0.0049896240    0.0088987350    0.0128555298  
 -0.0050000000    0.0050000000    2537
-  0.7500000000         783784    0.7474746704   -0.0129470825   -0.0087814331  
 -0.0050115585   -0.0009574890    0.0063943863    0.0078306198    0.0146341324  
 -0.0050000000    0.0050000000    2408
-  0.7600000000         794376    0.7575759888   -0.0119380951   -0.0102119446  
 -0.0034246445    0.0004472733    0.0046901703    0.0088233948    0.0124750137  
 -0.0050000000    0.0050000000    2510
-  0.7700000000         804968    0.7676773071   -0.0132970810   -0.0093441010  
 -0.0044746399   -0.0009002686    0.0061817169    0.0102005005    0.0116529465  
 -0.0050000000    0.0050000000    2462
-  0.7800000000         815559    0.7777776718   -0.0117378235   -0.0104112625  
 -0.0035648346    0.0004281998    0.0044307709    0.0091276169    0.0123538971  
 -0.0050000000    0.0050000000    2357
-  0.7900000000         826151    0.7878789902   -0.0134248734   -0.0094728470  
 -0.0048017502   -0.0006704330    0.0032663345    0.0100841522    0.0113487244  
 -0.0050000000    0.0050000000    2404
-  0.8000000000         836743    0.7979803085   -0.0117654800   -0.0078506470  
 -0.0041637421    0.0007820129    0.0043954849    0.0088977814    0.0129327774  
 -0.0050000000    0.0050000000    2352
-  0.8100000000         847334    0.8080806732   -0.0128803253   -0.0091228485  
 -0.0050115585    0.0018548965    0.0030822754    0.0094919205    0.0137910843  
 -0.0050000000    0.0050000000    2324
-  0.8200000000         857926    0.8181819916   -0.0118379593   -0.0079383850  
 -0.0061950684    0.0006179810    0.0047025681    0.0085029602    0.0126113892  
 -0.0050000000    0.0050000000    2349
-  0.8300000000         868518    0.8282833099   -0.0131149292   -0.0089368820  
 -0.0052833557    0.0014581680    0.0037517548    0.0074195862    0.0142164230  
 -0.0050000000    0.0050000000    2233
-  0.8400000000         879109    0.8383836746   -0.0151767731   -0.0076580048  
 -0.0036859512    0.0004310608    0.0045747757    0.0083370209    0.0131559372  
 -0.0050000000    0.0050000000    2247
-  0.8500000000         889701    0.8484849930   -0.0134916306   -0.0089149475  
 -0.0054225922   -0.0012731552    0.0060815811    0.0072984695    0.0114278793  
 -0.0050000000    0.0050000000    2195
-  0.8600000000         900293    0.8585863113   -0.0118656158   -0.0079193115  
 -0.0038070679    0.0000982285    0.0049257278    0.0088911057    0.0130271912  
 -0.0050000000    0.0050000000    2189
-  0.8700000000         910884    0.8686866760   -0.0138454437   -0.0097055435  
 -0.0047931671   -0.0009670258    0.0058727264    0.0096168518    0.0110177994  
 -0.0050000000    0.0050000000    2242
-  0.8800000000         921476    0.8787879944   -0.0120172501   -0.0107231140  
 -0.0039510727    0.0000162125    0.0046710968    0.0087957382    0.0127096176  
 -0.0050000000    0.0050000000    2181
-  0.8900000000         932068    0.8888893127   -0.0130844116   -0.0098133087  
 -0.0025234222   -0.0010604858    0.0028896332    0.0103521347    0.0114231110  
 -0.0050000000    0.0050000000    2111
-  0.9000000000         942659    0.8989896774   -0.0120706558   -0.0084390640  
 -0.0043144226    0.0003833771    0.0044612885    0.0084705353    0.0125265121  
 -0.0050000000    0.0050000000    1984
-  0.9100000000         953251    0.9090909958   -0.0131101608   -0.0094747543  
 -0.0053873062    0.0015106201    0.0025815964    0.0100526810    0.0139646530  
 -0.0050000000    0.0050000000    1914
-  0.9200000000         963843    0.9191923141   -0.0121650696   -0.0078687668  
 -0.0041933060    0.0002336502    0.0041913986    0.0081338882    0.0122461319  
 -0.0050000000    0.0050000000    1874
-  0.9300000000         974434    0.9292926788   -0.0132293701   -0.0095691681  
 -0.0056934357    0.0018520355    0.0055437088    0.0091714859    0.0136318207  
 -0.0050000000    0.0050000000    1806
-  0.9400000000         985026    0.9393939972   -0.0120687485   -0.0079822540  
 -0.0040721893   -0.0000715256    0.0041942596    0.0083894730    0.0125551224  
 -0.0050000000    0.0050000000    1772
-  0.9500000000         995618    0.9494953156   -0.0139255524   -0.0089511871  
 -0.0053501129   -0.0010166168    0.0056629181    0.0067644119    0.0107603073  
 -0.0050000000    0.0050000000    1626
-  0.9600000000        1006209    0.9595956802   -0.0122499466   -0.0082750320  
 -0.0041933060   -0.0002231598    0.0046072006    0.0085411072    0.0124082565  
 -0.0050000000    0.0050000000    1502
-  0.9700000000        1016801    0.9696969986   -0.0142297745   -0.0093698502  
 -0.0051584244   -0.0014467239    0.0057353973    0.0095090866    0.0140981674  
 -0.0050000000    0.0050000000    1212
-  0.9800000000        1027393    0.9797983170   -0.0125751495   -0.0084934235  
 -0.0038156509    0.0001430511    0.0042715073    0.0082082748    0.0121049881  
 -0.0050000000    0.0050000000     891
-  0.9900000000        1037984    0.9898986816   -0.0109558105   -0.0096817017  
 -0.0026550293   -0.0016183853    0.0052185059    0.0098571777    0.0101013184  
 -0.0050000000    0.0050000000     447
-  1.0000000000        1048576    1.0000000000    0.0000000000    0.0000000000  
  0.0000000000    0.0000000000    0.0000000000    0.0000000000    0.0000000000  
 -0.0050000000    0.0050000000       1
diff --git a/src/main/resources/quantiles/ReqSketchAccuracyJob.conf 
b/src/main/resources/quantiles/ReqSketchAccuracyJob.conf
index da3f785..e714d70 100644
--- a/src/main/resources/quantiles/ReqSketchAccuracyJob.conf
+++ b/src/main/resources/quantiles/ReqSketchAccuracyJob.conf
@@ -17,16 +17,21 @@
 
 
JobProfile=org.apache.datasketches.characterization.quantiles.ReqSketchAccuracyProfile
 
-# Trials config (indep of sketch)
+# Stream Pattern
+Pattern=FlipFlop # Sorted, Reversed, Zoomin, Zoomout, Random, Sqrt, FlipFlop
+Offset=1 #0 for min value of 0; 1 for min value of 1
+
 ## Stream lengths
 LgMin=20    # The starting stream length
 LgMax=20    # How high the stream length goes
 LgDelta=3   # If > 0, this is the lg Increment
 PPO=8       # The horizontal x-resolution of trials points
 
+# Trials config (indep of sketch)
 LgTrials=12 # lgTrials at every stream length
 ErrQSkLgK=12   # the rank error distribution sketch LgK
 ErrHllSkLgK=12 # the rank error HLL sketch Lgk
+Shuffle=false # If true, shuffle before each trial
 
 # Plotting
 NumPlotPoints=100 # number of plot points along the x-axis
@@ -36,13 +41,13 @@ StdDev=1 # std deviation used when plotting LB, UB
 RankRange=1.0 # range of rank to plot. E.g., given 0.3: if LRA => 0 to 0.3; if 
HRA => 0.7 to 1.0 
 
 # Specific sketch config
-K=12 # sketch size and accuracy parameter
+K=50 # sketch size and accuracy parameter
 
+HRA=true # if true use high-rank accuracy, otherwise low-rank accuracy
+Compatible=false
 #For LRA, LE,GT have the converged point at rank 1.0
 #For HRA, LT,GE have the converged point at rank 0.0
-Criterion=LE # LT, LE, GT, GE. Must be all caps.
-Compatible=false
-HRA=false # if true use high-rank accuracy, otherwise low-rank accuracy
+Criterion=LT # LT, LE, GT, GE. Must be all caps.
 
 #ReqDebugLevel=2 # or 0, 1, 2. disable by commenting it out. Use only when 
LgTrials=0
 #ReqDebugFmt=%5.0f
diff --git 
a/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
 
b/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
index da627e9..55ff1db 100644
--- 
a/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
+++ 
b/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile.java
@@ -20,8 +20,6 @@
 package org.apache.datasketches.characterization.quantiles;
 
 import static java.lang.Math.round;
-import static org.apache.datasketches.Criteria.GE;
-import static org.apache.datasketches.Criteria.LT;
 import static 
org.apache.datasketches.ExponentiallySpacedPoints.expSpacedFloats;
 import static org.apache.datasketches.GaussianRanks.GAUSSIANS_3SD;
 import static org.apache.datasketches.Util.evenlySpacedFloats;
@@ -33,6 +31,7 @@ import org.apache.datasketches.JobProfile;
 import org.apache.datasketches.MonotonicPoints;
 import org.apache.datasketches.Properties;
 import org.apache.datasketches.characterization.Shuffle;
+import org.apache.datasketches.characterization.quantiles.StreamMaker.Pattern;
 import org.apache.datasketches.hll.HllSketch;
 import org.apache.datasketches.quantiles.DoublesSketch;
 import org.apache.datasketches.quantiles.DoublesSketchBuilder;
@@ -49,6 +48,11 @@ public class ReqSketchAccuracyProfile implements JobProfile {
   private Properties prop;
 
   //FROM PROPERTIES
+  //Stream pattern config
+  StreamMaker streamMaker = new StreamMaker();
+  private Pattern pattern;
+  private int offset;
+
   //For computing the different stream lengths
   private int lgMin;
   private int lgMax;
@@ -58,6 +62,7 @@ public class ReqSketchAccuracyProfile implements JobProfile {
   private int numTrials; //num of Trials per plotPoint
   private int errQSkLgK; //size of the error quantiles sketches
   private int errHllSkLgK; //size of the error HLL sketch
+  private boolean shuffle; //if true, shuffle for each trial
 
   //plotting & x-axis configuration
   private int numPlotPoints;
@@ -82,19 +87,29 @@ public class ReqSketchAccuracyProfile implements JobProfile 
{
   private HllSketch[] errHllSkArr;
 
   //Specific to a streamLength
+  private TrueRanks trueRanks;
+  //The entire stream
   private float[] stream; //a shuffled array of values from 1...N
-  private float[] trueValues; //
-  private int trueValueCorrection;
-  private float[] corrTrueValues;
+  private float[] sortedStream;
+  private int[] sortedAbsRanks;
+  //private int[] streamAbsRanks ?? do we need?
+  //The PP points
+  private float[] sortedPPValues;
+  private int[] sortedPPIndices;
+  private int[] sortedPPAbsRanks;
 
   private final String[] columnLabels =
-    {"nPP", "Value", "Rank", "-3SD","-2SD", "-1SD", "Med", "+1SD", "+2SD", 
"+3SD", "1LB", "1UB", "U"};
+    {"nPP", "Value", "Rank",
+     "-3SD","-2SD", "-1SD", "Med", "+1SD", "+2SD", "+3SD",
+     "1LB", "1UB", "UErrCnt"};
   private final String sFmt =
-    "%3s\t%5s\t%4s\t%4s\t%4s\t%4s\t%5s\t%4s\t%4s\t%4s\t%3s\t%3s\t%3s\n";
+      "%3s\t%5s\t%4s\t"
+    + "%4s\t%4s\t%4s\t%5s\t%4s\t%4s\t%4s\t"
+    + "%3s\t%3s\t%7s\n";
   private final String fFmt =
     "%14.10f\t%14.0f\t%14.10f\t" //rPP, Value, Rank
   + "%14.10f\t%14.10f\t%14.10f\t%14.10f\t%14.10f\t%14.10f\t%14.10f\t" //-3sd 
to +3sd
-  + "%14.10f\t%14.10f\t%6d\n"; //1lb, 1ub, U
+  + "%14.10f\t%14.10f\t%6d\n"; //1lb, 1ub, UErrCnt
 
   //JobProfile interface
   @Override
@@ -103,7 +118,7 @@ public class ReqSketchAccuracyProfile implements JobProfile 
{
     prop = job.getProperties();
     extractProperties();
     configureCommon();
-    doJob();
+    doStreamLengths();
   }
 
   @Override
@@ -114,16 +129,20 @@ public class ReqSketchAccuracyProfile implements 
JobProfile {
   //end JobProfile
 
   private void extractProperties() {
-    //stream length
+    //Stream Pattern
+    pattern = Pattern.valueOf(prop.mustGet("Pattern"));
+    offset = Integer.parseInt(prop.mustGet("Offset"));
+    //Stream lengths
     lgMin = Integer.parseInt(prop.mustGet("LgMin"));
     lgMax = Integer.parseInt(prop.mustGet("LgMax"));
     lgDelta = Integer.parseInt(prop.mustGet("LgDelta"));
     ppo = Integer.parseInt(prop.mustGet("PPO"));
-    //numTrials & error quantiles & HLL sketch config
+    // Trials config (indep of sketch)
     numTrials = 1 << Integer.parseInt(prop.mustGet("LgTrials"));
     errQSkLgK = Integer.parseInt(prop.mustGet("ErrQSkLgK"));
     errHllSkLgK = Integer.parseInt(prop.mustGet("ErrHllSkLgK"));
-    //plotting & x-axis config
+    shuffle = Boolean.valueOf(prop.mustGet("Shuffle"));
+    //plotting
     numPlotPoints = Integer.parseInt(prop.mustGet("NumPlotPoints"));
     evenlySpaced = Boolean.valueOf(prop.mustGet("EvenlySpaced"));
     exponent = Double.parseDouble(prop.mustGet("Exponent"));
@@ -144,9 +163,6 @@ public class ReqSketchAccuracyProfile implements JobProfile 
{
 
   void configureCommon() {
     configureSketch();
-    trueValues = new float[numPlotPoints];
-    corrTrueValues = new float[numPlotPoints];
-    trueValueCorrection = criterion == GE || criterion == LT ? 1 : 0;
     errQSkArr = new UpdateDoublesSketch[numPlotPoints];
     errHllSkArr = new HllSketch[numPlotPoints];
     //configure the error quantiles array & HLL sketch arr
@@ -169,7 +185,7 @@ public class ReqSketchAccuracyProfile implements JobProfile 
{
     sk.setCriterion(criterion);
   }
 
-  private void doJob() {
+  private void doStreamLengths() {
     //compute the number of stream lengths for the whole job
     final int numSteps;
     final boolean useppo;
@@ -186,7 +202,9 @@ public class ReqSketchAccuracyProfile implements JobProfile 
{
 
     // Step through the different stream lengths
     for (int step = 0; step < numSteps; step++) {
+
       doStreamLength(streamLength);
+
       //go to next stream length
       if (useppo) {
         streamLength = pwr2LawNext(ppo, streamLength);
@@ -200,47 +218,63 @@ public class ReqSketchAccuracyProfile implements 
JobProfile {
   void doStreamLength(final int streamLength) {
     job.println(LS + "Stream Length: " + streamLength );
     job.printfData(sFmt, (Object[])columnLabels);
-
     //build the stream
-    //the values themselves reflect their integer ranks starting with 1.
-    stream = new float[streamLength];
-    for (int sl = 1; sl <= streamLength; sl++) { stream[sl - 1] = sl; } //1 to 
SL
+    stream = streamMaker.makeStream(streamLength, pattern, offset);
+    //compute true ranks
+    if (criterion == Criteria.LE) {
+      trueRanks = new TrueRanks(stream, true);
+    } else {
+      trueRanks = new TrueRanks(stream, false);
+    }
+    sortedStream = trueRanks.getSortedStream();
+    sortedAbsRanks = trueRanks.getSortedAbsRanks();
 
     //compute the true values used at the plot points
-    final int subStreamLen = (int)Math.round(rankRange * streamLength);
-    final float start = hra ? streamLength - subStreamLen : 1.0f;
-    final float end = hra ? streamLength : subStreamLen;
-    final float[] fltValues = evenlySpaced
-        ? evenlySpacedFloats(start, end, numPlotPoints)
-        : expSpacedFloats(1.0f, streamLength, numPlotPoints, exponent, hra);
+    int startIdx = 0;
+    int endIdx = streamLength - 1;
+    if (rankRange < 1.0) { //A substream of points focuses on a sub-range at 
one end.
+      final int subStreamLen = (int)Math.round(rankRange * streamLength);
+      startIdx = hra ? streamLength - subStreamLen : 0;
+      endIdx = hra ? streamLength - 1 : subStreamLen - 1;
+    }
+
+    //generates PP indices in [startIdx, endIdx] inclusive, inclusive
+    final float[] temp = evenlySpaced
+        ? evenlySpacedFloats(startIdx, endIdx, numPlotPoints)
+        : expSpacedFloats(startIdx, endIdx, numPlotPoints, exponent, hra);
+
+    sortedPPIndices = new int[numPlotPoints];
+    sortedPPAbsRanks = new int[numPlotPoints];
+    sortedPPValues = new float[numPlotPoints];
 
     for (int pp = 0; pp < numPlotPoints; pp++) {
-      trueValues[pp] = round(fltValues[pp]);
-      corrTrueValues[pp] = trueValues[pp] - trueValueCorrection;
+      final int idx = Math.round(temp[pp]);
+      sortedPPIndices[pp] = idx;
+      sortedPPAbsRanks[pp] = sortedAbsRanks[idx];
+      sortedPPValues[pp] = sortedStream[idx];
     }
 
     //Do numTrials for all plotpoints
     for (int t = 0; t < numTrials; t++) {
-      doTrial(sk, stream, trueValues, corrTrueValues, errQSkArr, errHllSkArr);
+      doTrial();
     }
 
     //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];
+      final double v = sortedPPValues[pp];
       final double tr = v / streamLength; //the true rank
       final double rlb = sk.getRankLowerBound(tr, sd) - tr;
       final double rub = sk.getRankUpperBound(tr, sd) - tr;
 
-
-      //for each of the numErrDistRanks distributions extract the sd quantiles
-      final double[] errQ = errQSkArr[pp].getQuantiles(gRanks); //get error 
values at the Gaussian ranks
-      final int errCnt = (int)round(errHllSkArr[pp].getEstimate());
+      //for each of the numErrDistRanks distributions extract the sd Gaussian 
quantiles
+      final double[] errQ = errQSkArr[pp].getQuantiles(gRanks);
+      final int uErrCnt = (int)round(errHllSkArr[pp].getEstimate());
 
       //Plot the row.
       final double relPP = (double)(pp + 1) / numPlotPoints;
       job.printfData(fFmt, relPP, v, tr,
           errQ[0], errQ[1], errQ[2], errQ[3], errQ[4], errQ[5], errQ[6],
-          rlb, rub, errCnt);
+          rlb, rub, uErrCnt);
       errQSkArr[pp].reset(); //reset the errQSkArr for next streamLength
       errHllSkArr[pp].reset(); //reset the errHllSkArr for next streamLength
     }
@@ -249,29 +283,22 @@ public class ReqSketchAccuracyProfile implements 
JobProfile {
   }
 
   /**
-   * A trial consists of updating a virgin sketch with a shuffled stream of 
streamLength values.
-   * We capture the estimated ranks for all plotPoints and then update the 
errQSkArr with those
+   * A trial consists of updating a virgin sketch with a stream of values.
+   * Capture the estimated ranks for all plotPoints and then update the 
errQSkArr with those
    * error values.
-   * @param stream the source stream
-   * @param trueValues the true integer ranks at each of the plot points
-   * @param errQSkArr the quantile error sketches for each plot point to be 
updated
    */
-  static void doTrial(final ReqSketch sk, final float[] stream, final float[] 
trueValues,
-      final float[] corrTrueValues, final UpdateDoublesSketch[] errQSkArr, 
HllSketch[] errHllSkArr) {
+  void doTrial() {
     sk.reset();
-    Shuffle.shuffle(stream);
+    if (shuffle) { Shuffle.shuffle(stream); }
     final int sl = stream.length;
-    for (int i = 0; i < sl; i++) {
-      sk.update(stream[i]);
-    }
-    //get estimated ranks from sketch for all plotpoints, this is a bulk 
operation
-    final double[] estRanks = sk.getRanks(trueValues);
-    final int numPP = trueValues.length;
+    for (int i = 0; i < sl; i++) { sk.update(stream[i]); }
+    //get estimated ranks from sketch for all plotpoints
+    final double[] estRanks = sk.getRanks(sortedPPValues);
     //compute errors and update HLL for each plotPoint
-    for (int pp = 0; pp < numPP; pp++) {
-      final double errorAtPlotPoint = estRanks[pp] - 
(double)corrTrueValues[pp] / sl;
+    for (int pp = 0; pp < numPlotPoints; pp++) {
+      final double errorAtPlotPoint = estRanks[pp] - 
(double)sortedPPAbsRanks[pp] / sl;
       errQSkArr[pp].update(errorAtPlotPoint); //update each of the errQArr 
sketches
-      errHllSkArr[pp].update(errorAtPlotPoint);
+      errHllSkArr[pp].update(errorAtPlotPoint); //unique count of error values
     }
   }
 
diff --git 
a/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile2.java
 
b/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile2.java
index 727eaf8..3c18257 100644
--- 
a/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile2.java
+++ 
b/src/test/java/org/apache/datasketches/characterization/quantiles/ReqSketchAccuracyProfile2.java
@@ -72,6 +72,7 @@ public class ReqSketchAccuracyProfile2 implements JobProfile {
   private UpdateDoublesSketch[] errQSkArr;
 
   //Specific to the stream
+  private StreamMaker streamMaker;
   private TrueRanks trueRanks;
   private float[] sortedPPValues;
   private int[] sortedPPIndices;
@@ -152,12 +153,12 @@ public class ReqSketchAccuracyProfile2 implements 
JobProfile {
 
   private void configureStream() {
     N = 1 << lgSL;
-    StreamMaker sm = new StreamMaker();
-    float[] stream = sm.makeStream(N, pattern, offset);
-    if (criterion == Criteria.LT) {
-      trueRanks = new TrueRanks(stream, false);
-    } else {
+    streamMaker = new StreamMaker();
+    float[] stream = streamMaker.makeStream(N, pattern, offset);
+    if (criterion == Criteria.LE) {
       trueRanks = new TrueRanks(stream, true);
+    } else {
+      trueRanks = new TrueRanks(stream, false);
     }
   }
 
@@ -168,7 +169,8 @@ public class ReqSketchAccuracyProfile2 implements 
JobProfile {
     final int[] sortedAbsRanks = trueRanks.getSortedAbsRanks();
     final float[] sortedStream = trueRanks.getSortedStream();
     int minIdx = (int)Math.round((double)(N - 1) / numPlotPoints);
-    final float[] temp = evenlySpacedFloats(minIdx, N - 1, numPlotPoints);
+    final float[] temp = evenlySpacedFloats(minIdx, N - 1, numPlotPoints); 
//indices
+
     for (int pp = 0; pp < numPlotPoints; pp++) {
       final int idx = Math.round(temp[pp]);
       sortedPPIndices[pp] = idx;
diff --git 
a/src/test/java/org/apache/datasketches/characterization/quantiles/TrueRanks.java
 
b/src/test/java/org/apache/datasketches/characterization/quantiles/TrueRanks.java
index f725f22..cc3bf60 100644
--- 
a/src/test/java/org/apache/datasketches/characterization/quantiles/TrueRanks.java
+++ 
b/src/test/java/org/apache/datasketches/characterization/quantiles/TrueRanks.java
@@ -40,7 +40,7 @@ public class TrueRanks {
   private float[] stream;
   private float[] sortedStream;
   private int[] sortedAbsRanks;
-  private int[] streamAbsRanks; //??
+  private int[] streamAbsRanks; //TODO do we need this?
 
   TrueRanks() { } //for TestNG
 
@@ -80,7 +80,7 @@ public class TrueRanks {
   }
 
   /**
-   * Compute Absolute Rank.
+   * Sorts the stream, then computes the sortedAbsRanks based on the 
comparison criterion.
    */
   private void compute() {
     length = stream.length;
@@ -90,7 +90,7 @@ public class TrueRanks {
     if (ltEq) { //LE
       sortedAbsRanks[length - 1] = length;
       int i = length - 2;
-      while (i >= 0) {
+      while (i >= 0) { //goes backwards
         if (sortedStream[i] == sortedStream[i + 1]) { sortedAbsRanks[i] = 
sortedAbsRanks[i + 1]; }
         else { sortedAbsRanks[i] = i + 1; }
         i--;
@@ -98,13 +98,13 @@ public class TrueRanks {
     } else { // LT
       sortedAbsRanks[0] = 0;
       int i = 1;
-      while (i < length) {
+      while (i < length) { //forwards
         if (sortedStream[i - 1] == sortedStream[i]) { sortedAbsRanks[i] = 
sortedAbsRanks[i - 1]; }
         else { sortedAbsRanks[i] = i; }
         i++;
       }
     }
-    streamAbsRanks = new int[length]; //put the ranks in values order
+    streamAbsRanks = new int[length]; //put the ranks in original stream order
     for (int j = 0; j < length; j++) {
       final int idx = BinarySearch.find(sortedStream, 0, length - 1, 
stream[j]);
       streamAbsRanks[j] = sortedAbsRanks[idx];


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to