layout: doc_page

Choosing Desired Relative Error For Theta Sketches

Note: Early on, we used the term “Nominal Entries” as an alias for K, because there is only a nominal relationship between the parameter given in the class constructor and the actual number of retained values (and thus its size) of the sketch. This was an intentional trade-off to improve performance. Nonetheless, the number of retained entries as well as the current size of the sketch can always be obtained from the sketch itself. Now we find it more convenient and compact to just use the term “K”.

Quick Select Sketch (Default)

 #Std Dev:123
Conf:68.27%95.45%99.73%
LgKK1 RSE2 RSE3 RSE
41625.820%51.640%77.460%
53217.961%35.921%53.882%
66412.599%25.198%37.796%
71288.874%17.747%26.621%
82566.262%12.524%18.787%
95124.424%8.847%13.271%
101,0243.127%6.253%9.380%
112,0482.210%4.420%6.631%
124,0961.563%3.125%4.688%
138,1921.105%2.210%3.315%
1416,3840.781%1.563%2.344%
1532,7680.552%1.105%1.657%
1665,5360.391%0.781%1.172%
17131,0720.276%0.552%0.829%
18262,1440.195%0.391%0.586%
19524,2880.138%0.276%0.414%
201,048,5760.098%0.195%0.293%
212,097,1520.069%0.138%0.207%
224,194,3040.049%0.098%0.146%
238,388,6080.035%0.069%0.104%
2416,777,2160.024%0.049%0.073%
2533,554,4320.017%0.035%0.052%
2667,108,8640.012%0.024%0.037%

Alpha Sketch

Note: These RSE calculations are only valid for an Alpha Sketch prior to any merge (Union) operation. After a union operation the RSE reverts to the QuickSelect numbers above.

 #Std Dev:123
Conf:68.27%95.45%99.73%
LgKK1 RSE2 RSE3 RSE
95123.132%6.264%9.396%
101,0242.214%4.427%6.641%
112,0481.565%3.130%4.695%
124,0961.106%2.213%3.319%
138,1920.782%1.565%2.347%
1416,3840.553%1.106%1.659%
1532,7680.391%0.782%1.173%
1665,5360.277%0.553%0.830%
17131,0720.196%0.391%0.587%
18262,1440.138%0.277%0.415%
19524,2880.098%0.196%0.293%
201,048,5760.069%0.138%0.207%
212,097,1520.049%0.098%0.147%
224,194,3040.035%0.069%0.104%
238,388,6080.024%0.049%0.073%
2416,777,2160.017%0.035%0.052%
2533,554,4320.012%0.024%0.037%
2667,108,8640.009%0.017%0.026%