This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/datasketches-python.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new beea149 deploy: e1c68cc79c2b0b4aeda63279b5bea5aa4ed838a0
beea149 is described below
commit beea149ece6e752cbb6ea2e22de622212e2c3042
Author: jmalkin <[email protected]>
AuthorDate: Thu Jan 16 00:48:30 2025 +0000
deploy: e1c68cc79c2b0b4aeda63279b5bea5aa4ed838a0
---
docs/main/_sources/quantiles/index.rst.txt | 14 +-
docs/main/_sources/quantiles/kll.rst.txt | 5 -
docs/main/_sources/quantiles/tdigest.rst.txt | 52 +++
docs/main/_static/pygments.css | 36 +-
docs/main/distinct_counting/cpc.html | 2 +-
docs/main/distinct_counting/hyper_log_log.html | 2 +-
docs/main/distinct_counting/index.html | 2 +-
docs/main/distinct_counting/theta.html | 2 +-
docs/main/distinct_counting/tuple.html | 2 +-
docs/main/frequency/count_min_sketch.html | 2 +-
docs/main/frequency/frequent_items.html | 2 +-
docs/main/frequency/index.html | 2 +-
docs/main/genindex.html | 78 ++++-
docs/main/helper/index.html | 2 +-
docs/main/helper/jaccard.html | 2 +-
docs/main/helper/kernel.html | 2 +-
docs/main/helper/ks_test.html | 2 +-
docs/main/helper/serde.html | 2 +-
docs/main/helper/tuple_policy.html | 2 +-
docs/main/index.html | 3 +-
docs/main/objects.inv | Bin 4105 -> 4334 bytes
docs/main/quantiles/index.html | 15 +-
docs/main/quantiles/kll.html | 6 +-
docs/main/quantiles/quantiles_depr.html | 7 +-
docs/main/quantiles/req.html | 7 +-
docs/main/quantiles/tdigest.html | 445 +++++++++++++++++++++++++
docs/main/sampling/ebpps.html | 2 +-
docs/main/sampling/index.html | 2 +-
docs/main/sampling/varopt.html | 2 +-
docs/main/search.html | 2 +-
docs/main/searchindex.js | 2 +-
docs/main/vector/density_sketch.html | 2 +-
docs/main/vector/index.html | 2 +-
33 files changed, 644 insertions(+), 66 deletions(-)
diff --git a/docs/main/_sources/quantiles/index.rst.txt
b/docs/main/_sources/quantiles/index.rst.txt
index b1928f6..bf53ea3 100644
--- a/docs/main/_sources/quantiles/index.rst.txt
+++ b/docs/main/_sources/quantiles/index.rst.txt
@@ -10,17 +10,21 @@ in the stream.
These sketches may be used to compute approximate histograms, Probability Mass
Functions (PMFs), or
Cumulative Distribution Functions (CDFs).
-The library provides three types of quantiles sketches, each of which has
generic items as well as versions
-specific to a given numeric type (e.g. integer or floating point values). All
three types provide error
-bounds on rank estimation with proven probabilistic error distributions.
+The library provides four types of quantiles sketches, three of which have
generic items as well as versions
+specific to a given numeric type (e.g. integer or floating point values).
Those three types provide error
+bounds on rank estimation with proven probabilistic error distributions.
t-digest is a heuristic-based sketch
+that works only on numeric data, and while the error properties are not
guaranteed, the sketch typically
+does a good job with small storage.
- * KLL: Provides uniform rank estimation error over the entire range
+ * KLL: Provides uniform rank estimation error over the entire range.
* REQ: Provides relative rank error estimates, which decreases approaching
either the high or low end values.
+ * t-digest: Relative rank error estimates, heuristic-based without
guarantees but quite compact with generally very good error properties.
* Classic quantiles: Largely deprecated in favor of KLL, also provides
uniform rank estimation error. Included largely for backwards compatibility
with historic data.
.. toctree::
:maxdepth: 1
-
+
kll
req
+ tdigest
quantiles_depr
\ No newline at end of file
diff --git a/docs/main/_sources/quantiles/kll.rst.txt
b/docs/main/_sources/quantiles/kll.rst.txt
index 0e54b44..ab7f0c4 100644
--- a/docs/main/_sources/quantiles/kll.rst.txt
+++ b/docs/main/_sources/quantiles/kll.rst.txt
@@ -14,10 +14,6 @@ The analysis is obtained using `get_quantile()` function or
the
inverse functions `get_rank()`, `get_pmf()` (Probability Mass Function), and
`get_cdf()`
(Cumulative Distribution Function).
-As of May 2020, this implementation produces serialized sketches which are
binary-compatible
-with the equivalent Java implementation only when template parameter `T =
float`
-(32-bit single precision values).
-
Given an input stream of `N` items, the `natural rank` of any specific
item is defined as its index `(1 to N)` in inclusive mode
or `(0 to N-1)` in exclusive mode
@@ -168,4 +164,3 @@ Additionally, the interval may be quite large for certain
distributions.
.. rubric:: Non-static Methods:
.. automethod:: __init__
-
diff --git a/docs/main/_sources/quantiles/tdigest.rst.txt
b/docs/main/_sources/quantiles/tdigest.rst.txt
new file mode 100644
index 0000000..f697cbe
--- /dev/null
+++ b/docs/main/_sources/quantiles/tdigest.rst.txt
@@ -0,0 +1,52 @@
+t-digest
+--------
+
+.. currentmodule:: datasketches
+
+The implementation in this library is based on the MergingDigest described in
+`Computing Extremely Accurate Quantiles Using t-Digests
<https://arxiv.org/abs/1902.04023>`_ by Ted Dunning and Otmar Ertl.
+
+The implementation in this library has a few differences from the reference
implementation associated with that paper:
+
+* Merge does not modify the input
+* Derialization similar to other sketches in this library, although reading
the reference implementation format is supported
+
+Unlike all other algorithms in the library, t-digest is empirical and has no
mathematical basis for estimating its error
+and its results are dependent on the input data. However, for many common data
distributions, it can produce excellent results.
+t-digest also operates only on numeric data and, unlike the quantiles family
algorithms in the library which return quantile
+approximations from the input domain, t-digest interpolates values and will
hold and return data points not seen in the input.
+
+The closest alternative to t-digest in this library is REQ sketch. It
prioritizes one chosen side of the rank domain:
+either low rank accuracy or high rank accuracy. t-digest (in this
implementation) prioritizes both ends of the rank domain
+and has lower accuracy towards the middle of the rank domain (median).
+
+Measurements show that t-digest is slightly biased (tends to underestimate low
ranks and overestimate high ranks), while still
+doing very well close to the extremes. The effect seems to be more pronounced
with more input values.
+
+For more information on the performance characteristics, see `the Datasketches
page on t-digest <https://datasketches.apache.org/docs/tdigest/tdigest.html>`_.
+
+.. autoclass:: tdigest_float
+ :members:
+ :undoc-members:
+ :exclude-members: deserialize
+
+ .. rubric:: Static Methods:
+
+ .. automethod:: deserialize
+
+ .. rubric:: Non-static Methods:
+
+ .. automethod:: __init__
+
+.. autoclass:: tdigest_double
+ :members:
+ :undoc-members:
+ :exclude-members: deserialize
+
+ .. rubric:: Static Methods:
+
+ .. automethod:: deserialize
+
+ .. rubric:: Non-static Methods:
+
+ .. automethod:: __init__
diff --git a/docs/main/_static/pygments.css b/docs/main/_static/pygments.css
index 84ab303..6f8b210 100644
--- a/docs/main/_static/pygments.css
+++ b/docs/main/_static/pygments.css
@@ -6,9 +6,9 @@ span.linenos.special { color: #000000; background-color:
#ffffc0; padding-left:
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
-.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .err { border: 1px solid #F00 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
-.highlight .o { color: #666666 } /* Operator */
+.highlight .o { color: #666 } /* Operator */
.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #9C6500 } /* Comment.Preproc */
@@ -25,34 +25,34 @@ span.linenos.special { color: #000000; background-color:
#ffffc0; padding-left:
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .gt { color: #04D } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
-.highlight .m { color: #666666 } /* Literal.Number */
+.highlight .m { color: #666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #687822 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
-.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.highlight .no { color: #880000 } /* Name.Constant */
-.highlight .nd { color: #AA22FF } /* Name.Decorator */
+.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
+.highlight .no { color: #800 } /* Name.Constant */
+.highlight .nd { color: #A2F } /* Name.Decorator */
.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
-.highlight .nf { color: #0000FF } /* Name.Function */
+.highlight .nf { color: #00F } /* Name.Function */
.highlight .nl { color: #767600 } /* Name.Label */
-.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
-.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mb { color: #666666 } /* Literal.Number.Bin */
-.highlight .mf { color: #666666 } /* Literal.Number.Float */
-.highlight .mh { color: #666666 } /* Literal.Number.Hex */
-.highlight .mi { color: #666666 } /* Literal.Number.Integer */
-.highlight .mo { color: #666666 } /* Literal.Number.Oct */
+.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #BBB } /* Text.Whitespace */
+.highlight .mb { color: #666 } /* Literal.Number.Bin */
+.highlight .mf { color: #666 } /* Literal.Number.Float */
+.highlight .mh { color: #666 } /* Literal.Number.Hex */
+.highlight .mi { color: #666 } /* Literal.Number.Integer */
+.highlight .mo { color: #666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
@@ -67,9 +67,9 @@ span.linenos.special { color: #000000; background-color:
#ffffc0; padding-left:
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
-.highlight .fm { color: #0000FF } /* Name.Function.Magic */
+.highlight .fm { color: #00F } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
-.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
+.highlight .il { color: #666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/docs/main/distinct_counting/cpc.html
b/docs/main/distinct_counting/cpc.html
index 1b755f3..a9f6d96 100644
--- a/docs/main/distinct_counting/cpc.html
+++ b/docs/main/distinct_counting/cpc.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Compressed Probabilistic Counting (CPC) — datasketches 0.1
documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/distinct_counting/hyper_log_log.html
b/docs/main/distinct_counting/hyper_log_log.html
index 515e5d0..91052a1 100644
--- a/docs/main/distinct_counting/hyper_log_log.html
+++ b/docs/main/distinct_counting/hyper_log_log.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HyperLogLog (HLL) — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/distinct_counting/index.html
b/docs/main/distinct_counting/index.html
index 759fa8b..ce4493d 100644
--- a/docs/main/distinct_counting/index.html
+++ b/docs/main/distinct_counting/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Distinct Counting — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/distinct_counting/theta.html
b/docs/main/distinct_counting/theta.html
index 2869114..ac72520 100644
--- a/docs/main/distinct_counting/theta.html
+++ b/docs/main/distinct_counting/theta.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Theta Sketch — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/distinct_counting/tuple.html
b/docs/main/distinct_counting/tuple.html
index 3c060fe..74c4806 100644
--- a/docs/main/distinct_counting/tuple.html
+++ b/docs/main/distinct_counting/tuple.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tuple Sketch — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/frequency/count_min_sketch.html
b/docs/main/frequency/count_min_sketch.html
index 8f7f51d..7cc361b 100644
--- a/docs/main/frequency/count_min_sketch.html
+++ b/docs/main/frequency/count_min_sketch.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CountMin Sketch — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/frequency/frequent_items.html
b/docs/main/frequency/frequent_items.html
index fd61d83..9142ac2 100644
--- a/docs/main/frequency/frequent_items.html
+++ b/docs/main/frequency/frequent_items.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Frequent Items — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/frequency/index.html b/docs/main/frequency/index.html
index 0f2d425..8c1168f 100644
--- a/docs/main/frequency/index.html
+++ b/docs/main/frequency/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Frequency Sketches — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/genindex.html b/docs/main/genindex.html
index ade0a89..8c4b453 100644
--- a/docs/main/genindex.html
+++ b/docs/main/genindex.html
@@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="_static/css/theme.css?v=e59714d7" />
@@ -159,6 +159,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.__init__">(req_ints_sketch
method)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.__init__">(req_items_sketch
method)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.__init__">(tdigest_double
method)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.__init__">(tdigest_float
method)</a>
</li>
<li><a
href="distinct_counting/theta.html#datasketches.theta_a_not_b.__init__">(theta_a_not_b
method)</a>
</li>
@@ -207,6 +211,12 @@
</li>
<li><a
href="distinct_counting/tuple.html#datasketches.compact_tuple_sketch">compact_tuple_sketch
(class in datasketches)</a>
</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.compress">compress
(tdigest_double attribute)</a>
+
+ <ul>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.compress">(tdigest_float
attribute)</a>
+</li>
+ </ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a
href="distinct_counting/theta.html#datasketches.theta_a_not_b.compute">compute
(theta_a_not_b attribute)</a>
@@ -273,6 +283,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.deserialize">(req_ints_sketch
method)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.deserialize">(req_items_sketch
method)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.deserialize">(tdigest_double
method)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.deserialize">(tdigest_float
method)</a>
</li>
<li><a
href="sampling/varopt.html#datasketches.var_opt_sketch.deserialize">(var_opt_sketch
method)</a>
</li>
@@ -371,6 +385,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.get_cdf">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.get_cdf">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_cdf">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_cdf">(tdigest_float
attribute)</a>
</li>
</ul></li>
<li><a
href="distinct_counting/hyper_log_log.html#datasketches.hll_sketch.get_compact_serialization_bytes">get_compact_serialization_bytes
(hll_sketch attribute)</a>
@@ -449,6 +467,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.get_max_value">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.get_max_value">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_max_value">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_max_value">(tdigest_float
attribute)</a>
</li>
</ul></li>
<li><a
href="quantiles/kll.html#datasketches.kll_doubles_sketch.get_min_value">get_min_value
(kll_doubles_sketch attribute)</a>
@@ -473,6 +495,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.get_min_value">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.get_min_value">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_min_value">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_min_value">(tdigest_float
attribute)</a>
</li>
</ul></li>
<li><a
href="quantiles/kll.html#datasketches.kll_doubles_sketch.get_normalized_rank_error">get_normalized_rank_error()
(kll_doubles_sketch method)</a>
@@ -515,6 +541,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.get_pmf">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.get_pmf">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_pmf">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_pmf">(tdigest_float
attribute)</a>
</li>
</ul></li>
</ul></td>
@@ -541,6 +571,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.get_quantile">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.get_quantile">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_quantile">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_quantile">(tdigest_float
attribute)</a>
</li>
</ul></li>
<li><a
href="quantiles/kll.html#datasketches.kll_doubles_sketch.get_quantiles">get_quantiles
(kll_doubles_sketch attribute)</a>
@@ -589,6 +623,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.get_rank">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.get_rank">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_rank">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_rank">(tdigest_float
attribute)</a>
</li>
</ul></li>
<li><a
href="quantiles/req.html#datasketches.req_floats_sketch.get_rank_lower_bound">get_rank_lower_bound
(req_floats_sketch attribute)</a>
@@ -653,6 +691,10 @@
<li><a
href="frequency/frequent_items.html#datasketches.frequent_items_sketch.get_serialized_size_bytes">(frequent_items_sketch
attribute)</a>
</li>
<li><a
href="frequency/frequent_items.html#datasketches.frequent_strings_sketch.get_serialized_size_bytes">(frequent_strings_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_serialized_size_bytes">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_serialized_size_bytes">(tdigest_float
attribute)</a>
</li>
<li><a
href="sampling/varopt.html#datasketches.var_opt_sketch.get_serialized_size_bytes">(var_opt_sketch
attribute)</a>
</li>
@@ -661,6 +703,12 @@
</ul></li>
<li><a
href="helper/serde.html#datasketches.PyObjectSerDe.get_size">get_size()
(PyObjectSerDe method)</a>
</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.get_total_weight">get_total_weight
(tdigest_double attribute)</a>
+
+ <ul>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.get_total_weight">(tdigest_float
attribute)</a>
+</li>
+ </ul></li>
<li><a
href="distinct_counting/hyper_log_log.html#datasketches.hll_sketch.get_updatable_serialization_bytes">get_updatable_serialization_bytes
(hll_sketch attribute)</a>
</li>
<li><a
href="frequency/count_min_sketch.html#datasketches.count_min_sketch.get_upper_bound">get_upper_bound
(count_min_sketch attribute)</a>
@@ -751,6 +799,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.is_empty">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.is_empty">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.is_empty">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.is_empty">(tdigest_float
attribute)</a>
</li>
<li><a
href="distinct_counting/theta.html#datasketches.theta_sketch.is_empty">(theta_sketch
attribute)</a>
</li>
@@ -849,6 +901,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.k">(req_ints_sketch
property)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.k">(req_items_sketch
property)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.k">(tdigest_double
property)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.k">(tdigest_float
property)</a>
</li>
<li><a
href="sampling/varopt.html#datasketches.var_opt_sketch.k">(var_opt_sketch
property)</a>
</li>
@@ -923,6 +979,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.merge">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.merge">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.merge">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.merge">(tdigest_float
attribute)</a>
</li>
</ul></li>
</ul></td>
@@ -1139,6 +1199,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.serialize">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.serialize">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.serialize">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.serialize">(tdigest_float
attribute)</a>
</li>
<li><a
href="sampling/varopt.html#datasketches.var_opt_sketch.serialize">(var_opt_sketch
attribute)</a>
</li>
@@ -1167,6 +1231,10 @@
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double">tdigest_double (class
in datasketches)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float">tdigest_float (class
in datasketches)</a>
+</li>
<li><a
href="distinct_counting/hyper_log_log.html#datasketches.tgt_hll_type">tgt_hll_type
(class in _datasketches)</a>
</li>
<li><a
href="distinct_counting/hyper_log_log.html#datasketches.hll_sketch.tgt_type">tgt_type
(hll_sketch property)</a>
@@ -1231,6 +1299,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.to_string">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.to_string">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.to_string">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.to_string">(tdigest_float
attribute)</a>
</li>
<li><a
href="distinct_counting/theta.html#datasketches.theta_sketch.to_string">(theta_sketch
attribute)</a>
</li>
@@ -1315,6 +1387,10 @@
<li><a
href="quantiles/req.html#datasketches.req_ints_sketch.update">(req_ints_sketch
attribute)</a>
</li>
<li><a
href="quantiles/req.html#datasketches.req_items_sketch.update">(req_items_sketch
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_double.update">(tdigest_double
attribute)</a>
+</li>
+ <li><a
href="quantiles/tdigest.html#datasketches.tdigest_float.update">(tdigest_float
attribute)</a>
</li>
<li><a
href="distinct_counting/theta.html#datasketches.theta_intersection.update">(theta_intersection
attribute)</a>
</li>
diff --git a/docs/main/helper/index.html b/docs/main/helper/index.html
index 70a0b1a..dc74ac3 100644
--- a/docs/main/helper/index.html
+++ b/docs/main/helper/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Helper Classes — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/helper/jaccard.html b/docs/main/helper/jaccard.html
index 35b7d22..50c0548 100644
--- a/docs/main/helper/jaccard.html
+++ b/docs/main/helper/jaccard.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jaccard Similarity — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/helper/kernel.html b/docs/main/helper/kernel.html
index dd69805..87b1f53 100644
--- a/docs/main/helper/kernel.html
+++ b/docs/main/helper/kernel.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kernel Function — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/helper/ks_test.html b/docs/main/helper/ks_test.html
index 32cda6d..598de34 100644
--- a/docs/main/helper/ks_test.html
+++ b/docs/main/helper/ks_test.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kolmogorov-Smirnov Test — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/helper/serde.html b/docs/main/helper/serde.html
index 5820b42..61ecc02 100644
--- a/docs/main/helper/serde.html
+++ b/docs/main/helper/serde.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Serialize/Deserialize (SerDe) — datasketches 0.1
documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/helper/tuple_policy.html
b/docs/main/helper/tuple_policy.html
index 81ccdd3..db93a98 100644
--- a/docs/main/helper/tuple_policy.html
+++ b/docs/main/helper/tuple_policy.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tuple Policy — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/index.html b/docs/main/index.html
index a95e41a..5280b30 100644
--- a/docs/main/index.html
+++ b/docs/main/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Apache DataSketches — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="_static/css/theme.css?v=e59714d7" />
@@ -109,6 +109,7 @@
<li class="toctree-l1"><a class="reference internal"
href="quantiles/index.html">Quantiles Sketches</a><ul>
<li class="toctree-l2"><a class="reference internal"
href="quantiles/kll.html">KLL Sketch</a></li>
<li class="toctree-l2"><a class="reference internal"
href="quantiles/req.html">Relative Error Quantiles (REQ) Sketch</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="quantiles/tdigest.html">t-digest</a></li>
<li class="toctree-l2"><a class="reference internal"
href="quantiles/quantiles_depr.html">Quantiles Sketch (Deprecated)</a></li>
</ul>
</li>
diff --git a/docs/main/objects.inv b/docs/main/objects.inv
index 3eb72db..4e57db7 100644
Binary files a/docs/main/objects.inv and b/docs/main/objects.inv differ
diff --git a/docs/main/quantiles/index.html b/docs/main/quantiles/index.html
index be6fdc8..c94ed2e 100644
--- a/docs/main/quantiles/index.html
+++ b/docs/main/quantiles/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quantiles Sketches — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
@@ -49,6 +49,7 @@
<li class="toctree-l1 current"><a class="current reference internal"
href="#">Quantiles Sketches</a><ul>
<li class="toctree-l2"><a class="reference internal" href="kll.html">KLL
Sketch</a></li>
<li class="toctree-l2"><a class="reference internal" href="req.html">Relative
Error Quantiles (REQ) Sketch</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="tdigest.html">t-digest</a></li>
<li class="toctree-l2"><a class="reference internal"
href="quantiles_depr.html">Quantiles Sketch (Deprecated)</a></li>
</ul>
</li>
@@ -99,13 +100,16 @@ less-than-or-equal-to) the given item. Using
straightforward logic, they can als
in the stream.</p>
<p>These sketches may be used to compute approximate histograms, Probability
Mass Functions (PMFs), or
Cumulative Distribution Functions (CDFs).</p>
-<p>The library provides three types of quantiles sketches, each of which has
generic items as well as versions
-specific to a given numeric type (e.g. integer or floating point values). All
three types provide error
-bounds on rank estimation with proven probabilistic error distributions.</p>
+<p>The library provides four types of quantiles sketches, three of which have
generic items as well as versions
+specific to a given numeric type (e.g. integer or floating point values).
Those three types provide error
+bounds on rank estimation with proven probabilistic error distributions.
t-digest is a heuristic-based sketch
+that works only on numeric data, and while the error properties are not
guaranteed, the sketch typically
+does a good job with small storage.</p>
<blockquote>
<div><ul class="simple">
-<li><p>KLL: Provides uniform rank estimation error over the entire
range</p></li>
+<li><p>KLL: Provides uniform rank estimation error over the entire
range.</p></li>
<li><p>REQ: Provides relative rank error estimates, which decreases
approaching either the high or low end values.</p></li>
+<li><p>t-digest: Relative rank error estimates, heuristic-based without
guarantees but quite compact with generally very good error properties.</p></li>
<li><p>Classic quantiles: Largely deprecated in favor of KLL, also provides
uniform rank estimation error. Included largely for backwards compatibility
with historic data.</p></li>
</ul>
</div></blockquote>
@@ -113,6 +117,7 @@ bounds on rank estimation with proven probabilistic error
distributions.</p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="kll.html">KLL
Sketch</a></li>
<li class="toctree-l1"><a class="reference internal" href="req.html">Relative
Error Quantiles (REQ) Sketch</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="tdigest.html">t-digest</a></li>
<li class="toctree-l1"><a class="reference internal"
href="quantiles_depr.html">Quantiles Sketch (Deprecated)</a></li>
</ul>
</div>
diff --git a/docs/main/quantiles/kll.html b/docs/main/quantiles/kll.html
index 66e5bb6..43658ec 100644
--- a/docs/main/quantiles/kll.html
+++ b/docs/main/quantiles/kll.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>KLL Sketch — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
@@ -143,6 +143,7 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="req.html">Relative
Error Quantiles (REQ) Sketch</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="tdigest.html">t-digest</a></li>
<li class="toctree-l2"><a class="reference internal"
href="quantiles_depr.html">Quantiles Sketch (Deprecated)</a></li>
</ul>
</li>
@@ -196,9 +197,6 @@ that the items are comparable.
The analysis is obtained using <cite>get_quantile()</cite> function or the
inverse functions <cite>get_rank()</cite>, <cite>get_pmf()</cite> (Probability
Mass Function), and <cite>get_cdf()</cite>
(Cumulative Distribution Function).</p>
-<p>As of May 2020, this implementation produces serialized sketches which are
binary-compatible
-with the equivalent Java implementation only when template parameter <cite>T =
float</cite>
-(32-bit single precision values).</p>
<p>Given an input stream of <cite>N</cite> items, the <cite>natural
rank</cite> of any specific
item is defined as its index <cite>(1 to N)</cite> in inclusive mode
or <cite>(0 to N-1)</cite> in exclusive mode
diff --git a/docs/main/quantiles/quantiles_depr.html
b/docs/main/quantiles/quantiles_depr.html
index 774cfa1..645e0ab 100644
--- a/docs/main/quantiles/quantiles_depr.html
+++ b/docs/main/quantiles/quantiles_depr.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quantiles Sketch (Deprecated) — datasketches 0.1
documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
@@ -20,7 +20,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Frequency Sketches" href="../frequency/index.html"
/>
- <link rel="prev" title="Relative Error Quantiles (REQ) Sketch"
href="req.html" />
+ <link rel="prev" title="t-digest" href="tdigest.html" />
</head>
<body class="wy-body-for-nav">
@@ -49,6 +49,7 @@
<li class="toctree-l1 current"><a class="reference internal"
href="index.html">Quantiles Sketches</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="kll.html">KLL
Sketch</a></li>
<li class="toctree-l2"><a class="reference internal" href="req.html">Relative
Error Quantiles (REQ) Sketch</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="tdigest.html">t-digest</a></li>
<li class="toctree-l2 current"><a class="current reference internal"
href="#">Quantiles Sketch (Deprecated)</a><ul>
<li class="toctree-l3"><a class="reference internal"
href="#datasketches.quantiles_ints_sketch"><code class="docutils literal
notranslate"><span class="pre">quantiles_ints_sketch</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal"
href="#datasketches.quantiles_ints_sketch.deserialize"><code class="docutils
literal notranslate"><span
class="pre">quantiles_ints_sketch.deserialize()</span></code></a></li>
@@ -871,7 +872,7 @@ Constants were derived as the best fit to 99 percentile
empirically measured max
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation"
aria-label="Footer">
- <a href="req.html" class="btn btn-neutral float-left" title="Relative
Error Quantiles (REQ) Sketch" accesskey="p" rel="prev"><span class="fa
fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+ <a href="tdigest.html" class="btn btn-neutral float-left"
title="t-digest" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"
aria-hidden="true"></span> Previous</a>
<a href="../frequency/index.html" class="btn btn-neutral float-right"
title="Frequency Sketches" accesskey="n" rel="next">Next <span class="fa
fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
diff --git a/docs/main/quantiles/req.html b/docs/main/quantiles/req.html
index ca04c6c..67eb880 100644
--- a/docs/main/quantiles/req.html
+++ b/docs/main/quantiles/req.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Relative Error Quantiles (REQ) Sketch — datasketches 0.1
documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
@@ -19,7 +19,7 @@
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
- <link rel="next" title="Quantiles Sketch (Deprecated)"
href="quantiles_depr.html" />
+ <link rel="next" title="t-digest" href="tdigest.html" />
<link rel="prev" title="KLL Sketch" href="kll.html" />
</head>
@@ -126,6 +126,7 @@
</li>
</ul>
</li>
+<li class="toctree-l2"><a class="reference internal"
href="tdigest.html">t-digest</a></li>
<li class="toctree-l2"><a class="reference internal"
href="quantiles_depr.html">Quantiles Sketch (Deprecated)</a></li>
</ul>
</li>
@@ -723,7 +724,7 @@ Normalized rank must be a value between 0.0 and 1.0
(inclusive); the number of s
</div>
<footer><div class="rst-footer-buttons" role="navigation"
aria-label="Footer">
<a href="kll.html" class="btn btn-neutral float-left" title="KLL
Sketch" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"
aria-hidden="true"></span> Previous</a>
- <a href="quantiles_depr.html" class="btn btn-neutral float-right"
title="Quantiles Sketch (Deprecated)" accesskey="n" rel="next">Next <span
class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+ <a href="tdigest.html" class="btn btn-neutral float-right"
title="t-digest" accesskey="n" rel="next">Next <span class="fa
fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
diff --git a/docs/main/quantiles/tdigest.html b/docs/main/quantiles/tdigest.html
new file mode 100644
index 0000000..fc0ed9e
--- /dev/null
+++ b/docs/main/quantiles/tdigest.html
@@ -0,0 +1,445 @@
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" data-content_root="../">
+<head>
+ <meta charset="utf-8" /><meta name="viewport" content="width=device-width,
initial-scale=1" />
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>t-digest — datasketches 0.1 documentation</title>
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
+ <link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
+
+
+ <script src="../_static/jquery.js?v=5d32c60e"></script>
+ <script
src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
+ <script src="../_static/documentation_options.js?v=2709fde1"></script>
+ <script src="../_static/doctools.js?v=9bcbadda"></script>
+ <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
+ <script src="../_static/js/theme.js"></script>
+ <link rel="index" title="Index" href="../genindex.html" />
+ <link rel="search" title="Search" href="../search.html" />
+ <link rel="next" title="Quantiles Sketch (Deprecated)"
href="quantiles_depr.html" />
+ <link rel="prev" title="Relative Error Quantiles (REQ) Sketch"
href="req.html" />
+</head>
+
+<body class="wy-body-for-nav">
+ <div class="wy-grid-for-nav">
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+ <div class="wy-side-scroll">
+ <div class="wy-side-nav-search" >
+
+
+
+ <a href="../index.html" class="icon icon-home">
+ datasketches
+ </a>
+<div role="search">
+ <form id="rtd-search-form" class="wy-form" action="../search.html"
method="get">
+ <input type="text" name="q" placeholder="Search docs" aria-label="Search
docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+ </div><div class="wy-menu wy-menu-vertical" data-spy="affix"
role="navigation" aria-label="Navigation menu">
+ <ul>
+<li class="toctree-l1"><a class="reference internal"
href="../distinct_counting/index.html">Distinct Counting</a></li>
+</ul>
+<ul class="current">
+<li class="toctree-l1 current"><a class="reference internal"
href="index.html">Quantiles Sketches</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal" href="kll.html">KLL
Sketch</a></li>
+<li class="toctree-l2"><a class="reference internal" href="req.html">Relative
Error Quantiles (REQ) Sketch</a></li>
+<li class="toctree-l2 current"><a class="current reference internal"
href="#">t-digest</a><ul>
+<li class="toctree-l3"><a class="reference internal"
href="#datasketches.tdigest_float"><code class="docutils literal
notranslate"><span class="pre">tdigest_float</span></code></a><ul>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.deserialize"><code class="docutils literal
notranslate"><span
class="pre">tdigest_float.deserialize()</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.__init__"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.__init__()</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.compress"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.compress</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_cdf"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.get_cdf</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_max_value"><code class="docutils literal
notranslate"><span
class="pre">tdigest_float.get_max_value</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_min_value"><code class="docutils literal
notranslate"><span
class="pre">tdigest_float.get_min_value</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_pmf"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.get_pmf</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_quantile"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.get_quantile</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_rank"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.get_rank</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_serialized_size_bytes"><code
class="docutils literal notranslate"><span
class="pre">tdigest_float.get_serialized_size_bytes</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.get_total_weight"><code class="docutils
literal notranslate"><span
class="pre">tdigest_float.get_total_weight</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.is_empty"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.is_empty</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.k"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.k</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.merge"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.merge</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.serialize"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.serialize</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.to_string"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.to_string</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_float.update"><code class="docutils literal
notranslate"><span class="pre">tdigest_float.update</span></code></a></li>
+</ul>
+</li>
+<li class="toctree-l3"><a class="reference internal"
href="#datasketches.tdigest_double"><code class="docutils literal
notranslate"><span class="pre">tdigest_double</span></code></a><ul>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.deserialize"><code class="docutils literal
notranslate"><span
class="pre">tdigest_double.deserialize()</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.__init__"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.__init__()</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.compress"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.compress</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_cdf"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.get_cdf</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_max_value"><code class="docutils literal
notranslate"><span
class="pre">tdigest_double.get_max_value</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_min_value"><code class="docutils literal
notranslate"><span
class="pre">tdigest_double.get_min_value</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_pmf"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.get_pmf</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_quantile"><code class="docutils literal
notranslate"><span
class="pre">tdigest_double.get_quantile</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_rank"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.get_rank</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_serialized_size_bytes"><code
class="docutils literal notranslate"><span
class="pre">tdigest_double.get_serialized_size_bytes</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.get_total_weight"><code class="docutils
literal notranslate"><span
class="pre">tdigest_double.get_total_weight</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.is_empty"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.is_empty</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.k"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.k</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.merge"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.merge</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.serialize"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.serialize</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.to_string"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.to_string</span></code></a></li>
+<li class="toctree-l4"><a class="reference internal"
href="#datasketches.tdigest_double.update"><code class="docutils literal
notranslate"><span class="pre">tdigest_double.update</span></code></a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal"
href="quantiles_depr.html">Quantiles Sketch (Deprecated)</a></li>
+</ul>
+</li>
+</ul>
+<ul>
+<li class="toctree-l1"><a class="reference internal"
href="../frequency/index.html">Frequency Sketches</a></li>
+</ul>
+<ul>
+<li class="toctree-l1"><a class="reference internal"
href="../vector/index.html">Vector Sketches</a></li>
+</ul>
+<ul>
+<li class="toctree-l1"><a class="reference internal"
href="../sampling/index.html">Random Sampling Sketches</a></li>
+</ul>
+<ul>
+<li class="toctree-l1"><a class="reference internal"
href="../helper/index.html">Helper Classes</a></li>
+</ul>
+
+ </div>
+ </div>
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav
class="wy-nav-top" aria-label="Mobile navigation menu" >
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../index.html">datasketches</a>
+ </nav>
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="Page navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="../index.html" class="icon icon-home"
aria-label="Home"></a></li>
+ <li class="breadcrumb-item"><a href="index.html">Quantiles
Sketches</a></li>
+ <li class="breadcrumb-item active">t-digest</li>
+ <li class="wy-breadcrumbs-aside">
+ <a href="../_sources/quantiles/tdigest.rst.txt" rel="nofollow">
View page source</a>
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main" class="document" itemscope="itemscope"
itemtype="http://schema.org/Article">
+ <div itemprop="articleBody">
+
+ <section id="t-digest">
+<h1>t-digest<a class="headerlink" href="#t-digest" title="Link to this
heading"></a></h1>
+<p>The implementation in this library is based on the MergingDigest described
in
+<a class="reference external"
href="https://arxiv.org/abs/1902.04023">Computing Extremely Accurate Quantiles
Using t-Digests</a> by Ted Dunning and Otmar Ertl.</p>
+<p>The implementation in this library has a few differences from the reference
implementation associated with that paper:</p>
+<ul class="simple">
+<li><p>Merge does not modify the input</p></li>
+<li><p>Derialization similar to other sketches in this library, although
reading the reference implementation format is supported</p></li>
+</ul>
+<p>Unlike all other algorithms in the library, t-digest is empirical and has
no mathematical basis for estimating its error
+and its results are dependent on the input data. However, for many common data
distributions, it can produce excellent results.
+t-digest also operates only on numeric data and, unlike the quantiles family
algorithms in the library which return quantile
+approximations from the input domain, t-digest interpolates values and will
hold and return data points not seen in the input.</p>
+<p>The closest alternative to t-digest in this library is REQ sketch. It
prioritizes one chosen side of the rank domain:
+either low rank accuracy or high rank accuracy. t-digest (in this
implementation) prioritizes both ends of the rank domain
+and has lower accuracy towards the middle of the rank domain (median).</p>
+<p>Measurements show that t-digest is slightly biased (tends to underestimate
low ranks and overestimate high ranks), while still
+doing very well close to the extremes. The effect seems to be more pronounced
with more input values.</p>
+<p>For more information on the performance characteristics, see <a
class="reference external"
href="https://datasketches.apache.org/docs/tdigest/tdigest.html">the
Datasketches page on t-digest</a>.</p>
+<dl class="py class">
+<dt class="sig sig-object py" id="datasketches.tdigest_float">
+<em class="property"><span class="pre">class</span><span class="w">
</span></em><span class="sig-name descname"><span
class="pre">tdigest_float</span></span><span class="sig-paren">(</span><em
class="sig-param"><span class="o"><span class="pre">*</span></span><span
class="n"><span class="pre">args</span></span></em>, <em
class="sig-param"><span class="o"><span class="pre">**</span></span><span
class="n"><span class="pre">kwargs</span></span></em><span
class="sig-paren">)</span><a class=" [...]
+<dd><p class="rubric">Static Methods:</p>
+<dl class="py method">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.deserialize">
+<span class="sig-name descname"><span
class="pre">deserialize</span></span><span class="sig-paren">(</span><em
class="sig-param"><span class="n"><span class="pre">bytes</span></span><span
class="p"><span class="pre">:</span></span><span class="w"> </span><span
class="n"><span class="pre">bytes</span></span></em><span
class="sig-paren">)</span> <span class="sig-return"><span
class="sig-return-icon">→</span> <span class="sig-return-typehint"><a
class="reference internal" href="#data [...]
+<dd><p>Deserializes the sketch from a bytes object.</p>
+</dd></dl>
+
+<p class="rubric">Non-static Methods:</p>
+<dl class="py method">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.__init__">
+<span class="sig-name descname"><span class="pre">__init__</span></span><span
class="sig-paren">(</span><em class="sig-param"><span class="n"><span
class="pre">self</span></span></em>, <em class="sig-param"><span
class="n"><span class="pre">k</span></span><span class="p"><span
class="pre">:</span></span><span class="w"> </span><span class="n"><span
class="pre">int</span></span><span class="w"> </span><span class="o"><span
class="pre">=</span></span><span class="w"> </span><span class="de [...]
+<dd><p>Creates a tdigest instance with the given value of k.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters<span class="colon">:</span></dt>
+<dd class="field-odd"><p><strong>k</strong> (<em>int</em><em>,
</em><em>optional</em>) – Controls the size/accuracy trade-off of the sketch.
Default is 200.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.compress">
+<span class="sig-name descname"><span class="pre">compress</span></span><a
class="headerlink" href="#datasketches.tdigest_float.compress" title="Link to
this definition"></a></dt>
+<dd><p>Process buffered values and merge centroids, if necesssary</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_cdf">
+<span class="sig-name descname"><span class="pre">get_cdf</span></span><a
class="headerlink" href="#datasketches.tdigest_float.get_cdf" title="Link to
this definition"></a></dt>
+<dd><p>Returns an approximation to the Cumulative Distribution Function (CDF),
which is the cumulative analog of the PMF, of the input stream given a set of
split points (values).
+If the sketch is empty this returns an empty vector.
+split_points is an array of m unique, monotonically increasing float values
that divide the real number line into m+1 consecutive disjoint intervals.
+It is not necessary to include either the min or max values in these split
points.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_max_value">
+<span class="sig-name descname"><span
class="pre">get_max_value</span></span><a class="headerlink"
href="#datasketches.tdigest_float.get_max_value" title="Link to this
definition"></a></dt>
+<dd><p>Returns the maximum value from the stream. If empty, throws a
RuntimeError</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_min_value">
+<span class="sig-name descname"><span
class="pre">get_min_value</span></span><a class="headerlink"
href="#datasketches.tdigest_float.get_min_value" title="Link to this
definition"></a></dt>
+<dd><p>Returns the minimum value from the stream. If empty, throws a
RuntimeError</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_pmf">
+<span class="sig-name descname"><span class="pre">get_pmf</span></span><a
class="headerlink" href="#datasketches.tdigest_float.get_pmf" title="Link to
this definition"></a></dt>
+<dd><p>Returns an approximation to the Probability Mass Function (PMF) of the
input stream given a set of split points (values).
+If the sketch is empty this returns an empty vector.
+split_points is an array of m unique, monotonically increasing float values
that divide the real number line into m+1 consecutive disjoint intervals.
+It is not necessary to include either the min or max values in these split
points.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_quantile">
+<span class="sig-name descname"><span class="pre">get_quantile</span></span><a
class="headerlink" href="#datasketches.tdigest_float.get_quantile" title="Link
to this definition"></a></dt>
+<dd><p>Returns an approximation to the data value associated with the given
rank in a hypothetical sorted version of the input stream so far.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_rank">
+<span class="sig-name descname"><span class="pre">get_rank</span></span><a
class="headerlink" href="#datasketches.tdigest_float.get_rank" title="Link to
this definition"></a></dt>
+<dd><p>Computes the approximate normalized rank of the given value</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py"
id="datasketches.tdigest_float.get_serialized_size_bytes">
+<span class="sig-name descname"><span
class="pre">get_serialized_size_bytes</span></span><a class="headerlink"
href="#datasketches.tdigest_float.get_serialized_size_bytes" title="Link to
this definition"></a></dt>
+<dd><p>Returns the size of the serialized sketch, in bytes</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.get_total_weight">
+<span class="sig-name descname"><span
class="pre">get_total_weight</span></span><a class="headerlink"
href="#datasketches.tdigest_float.get_total_weight" title="Link to this
definition"></a></dt>
+<dd><p>The total weight processed by the sketch</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.is_empty">
+<span class="sig-name descname"><span class="pre">is_empty</span></span><a
class="headerlink" href="#datasketches.tdigest_float.is_empty" title="Link to
this definition"></a></dt>
+<dd><p>Returns True if the sketch is empty, otherwise False</p>
+</dd></dl>
+
+<dl class="py property">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.k">
+<em class="property"><span class="pre">property</span><span class="w">
</span></em><span class="sig-name descname"><span class="pre">k</span></span><a
class="headerlink" href="#datasketches.tdigest_float.k" title="Link to this
definition"></a></dt>
+<dd><p>The configured parameter k</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.merge">
+<span class="sig-name descname"><span class="pre">merge</span></span><a
class="headerlink" href="#datasketches.tdigest_float.merge" title="Link to this
definition"></a></dt>
+<dd><p>Merges the provided sketch into this one</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.serialize">
+<span class="sig-name descname"><span class="pre">serialize</span></span><a
class="headerlink" href="#datasketches.tdigest_float.serialize" title="Link to
this definition"></a></dt>
+<dd><p>Serializes the sketch into a bytes object.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.to_string">
+<span class="sig-name descname"><span class="pre">to_string</span></span><a
class="headerlink" href="#datasketches.tdigest_float.to_string" title="Link to
this definition"></a></dt>
+<dd><p>Produces a string summary of the sketch</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_float.update">
+<span class="sig-name descname"><span class="pre">update</span></span><a
class="headerlink" href="#datasketches.tdigest_float.update" title="Link to
this definition"></a></dt>
+<dd><p>Overloaded function.</p>
+<ol class="arabic simple">
+<li><p><code class="docutils literal notranslate"><span
class="pre">update(self,</span> <span class="pre">item:</span> <span
class="pre">float)</span> <span class="pre">-></span> <span
class="pre">None</span></code></p></li>
+</ol>
+<p>Updates the sketch with the given value</p>
+<ol class="arabic simple" start="2">
+<li><p><code class="docutils literal notranslate"><span
class="pre">update(self,</span> <span class="pre">array:</span> <span
class="pre">ndarray[dtype=float32])</span> <span class="pre">-></span> <span
class="pre">None</span></code></p></li>
+</ol>
+<p>Updates the sketch with the values in the given array</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="py class">
+<dt class="sig sig-object py" id="datasketches.tdigest_double">
+<em class="property"><span class="pre">class</span><span class="w">
</span></em><span class="sig-name descname"><span
class="pre">tdigest_double</span></span><span class="sig-paren">(</span><em
class="sig-param"><span class="o"><span class="pre">*</span></span><span
class="n"><span class="pre">args</span></span></em>, <em
class="sig-param"><span class="o"><span class="pre">**</span></span><span
class="n"><span class="pre">kwargs</span></span></em><span
class="sig-paren">)</span><a class= [...]
+<dd><p class="rubric">Static Methods:</p>
+<dl class="py method">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.deserialize">
+<span class="sig-name descname"><span
class="pre">deserialize</span></span><span class="sig-paren">(</span><em
class="sig-param"><span class="n"><span class="pre">bytes</span></span><span
class="p"><span class="pre">:</span></span><span class="w"> </span><span
class="n"><span class="pre">bytes</span></span></em><span
class="sig-paren">)</span> <span class="sig-return"><span
class="sig-return-icon">→</span> <span class="sig-return-typehint"><a
class="reference internal" href="#data [...]
+<dd><p>Deserializes the sketch from a bytes object.</p>
+</dd></dl>
+
+<p class="rubric">Non-static Methods:</p>
+<dl class="py method">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.__init__">
+<span class="sig-name descname"><span class="pre">__init__</span></span><span
class="sig-paren">(</span><em class="sig-param"><span class="n"><span
class="pre">self</span></span></em>, <em class="sig-param"><span
class="n"><span class="pre">k</span></span><span class="p"><span
class="pre">:</span></span><span class="w"> </span><span class="n"><span
class="pre">int</span></span><span class="w"> </span><span class="o"><span
class="pre">=</span></span><span class="w"> </span><span class="de [...]
+<dd><p>Creates a tdigest instance with the given value of k.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters<span class="colon">:</span></dt>
+<dd class="field-odd"><p><strong>k</strong> (<em>int</em><em>,
</em><em>optional</em>) – Controls the size/accuracy trade-off of the sketch.
Default is 200.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.compress">
+<span class="sig-name descname"><span class="pre">compress</span></span><a
class="headerlink" href="#datasketches.tdigest_double.compress" title="Link to
this definition"></a></dt>
+<dd><p>Process buffered values and merge centroids, if necesssary</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.get_cdf">
+<span class="sig-name descname"><span class="pre">get_cdf</span></span><a
class="headerlink" href="#datasketches.tdigest_double.get_cdf" title="Link to
this definition"></a></dt>
+<dd><p>Returns an approximation to the Cumulative Distribution Function (CDF),
which is the cumulative analog of the PMF, of the input stream given a set of
split points (values).
+If the sketch is empty this returns an empty vector.
+split_points is an array of m unique, monotonically increasing float values
that divide the real number line into m+1 consecutive disjoint intervals.
+It is not necessary to include either the min or max values in these split
points.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.get_max_value">
+<span class="sig-name descname"><span
class="pre">get_max_value</span></span><a class="headerlink"
href="#datasketches.tdigest_double.get_max_value" title="Link to this
definition"></a></dt>
+<dd><p>Returns the maximum value from the stream. If empty, throws a
RuntimeError</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.get_min_value">
+<span class="sig-name descname"><span
class="pre">get_min_value</span></span><a class="headerlink"
href="#datasketches.tdigest_double.get_min_value" title="Link to this
definition"></a></dt>
+<dd><p>Returns the minimum value from the stream. If empty, throws a
RuntimeError</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.get_pmf">
+<span class="sig-name descname"><span class="pre">get_pmf</span></span><a
class="headerlink" href="#datasketches.tdigest_double.get_pmf" title="Link to
this definition"></a></dt>
+<dd><p>Returns an approximation to the Probability Mass Function (PMF) of the
input stream given a set of split points (values).
+If the sketch is empty this returns an empty vector.
+split_points is an array of m unique, monotonically increasing float values
that divide the real number line into m+1 consecutive disjoint intervals.
+It is not necessary to include either the min or max values in these split
points.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.get_quantile">
+<span class="sig-name descname"><span class="pre">get_quantile</span></span><a
class="headerlink" href="#datasketches.tdigest_double.get_quantile" title="Link
to this definition"></a></dt>
+<dd><p>Returns an approximation to the data value associated with the given
rank in a hypothetical sorted version of the input stream so far.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.get_rank">
+<span class="sig-name descname"><span class="pre">get_rank</span></span><a
class="headerlink" href="#datasketches.tdigest_double.get_rank" title="Link to
this definition"></a></dt>
+<dd><p>Computes the approximate normalized rank of the given value</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py"
id="datasketches.tdigest_double.get_serialized_size_bytes">
+<span class="sig-name descname"><span
class="pre">get_serialized_size_bytes</span></span><a class="headerlink"
href="#datasketches.tdigest_double.get_serialized_size_bytes" title="Link to
this definition"></a></dt>
+<dd><p>Returns the size of the serialized sketch, in bytes</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py"
id="datasketches.tdigest_double.get_total_weight">
+<span class="sig-name descname"><span
class="pre">get_total_weight</span></span><a class="headerlink"
href="#datasketches.tdigest_double.get_total_weight" title="Link to this
definition"></a></dt>
+<dd><p>The total weight processed by the sketch</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.is_empty">
+<span class="sig-name descname"><span class="pre">is_empty</span></span><a
class="headerlink" href="#datasketches.tdigest_double.is_empty" title="Link to
this definition"></a></dt>
+<dd><p>Returns True if the sketch is empty, otherwise False</p>
+</dd></dl>
+
+<dl class="py property">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.k">
+<em class="property"><span class="pre">property</span><span class="w">
</span></em><span class="sig-name descname"><span class="pre">k</span></span><a
class="headerlink" href="#datasketches.tdigest_double.k" title="Link to this
definition"></a></dt>
+<dd><p>The configured parameter k</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.merge">
+<span class="sig-name descname"><span class="pre">merge</span></span><a
class="headerlink" href="#datasketches.tdigest_double.merge" title="Link to
this definition"></a></dt>
+<dd><p>Merges the provided sketch into this one</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.serialize">
+<span class="sig-name descname"><span class="pre">serialize</span></span><a
class="headerlink" href="#datasketches.tdigest_double.serialize" title="Link to
this definition"></a></dt>
+<dd><p>Serializes the sketch into a bytes object.</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.to_string">
+<span class="sig-name descname"><span class="pre">to_string</span></span><a
class="headerlink" href="#datasketches.tdigest_double.to_string" title="Link to
this definition"></a></dt>
+<dd><p>Produces a string summary of the sketch</p>
+</dd></dl>
+
+<dl class="py attribute">
+<dt class="sig sig-object py" id="datasketches.tdigest_double.update">
+<span class="sig-name descname"><span class="pre">update</span></span><a
class="headerlink" href="#datasketches.tdigest_double.update" title="Link to
this definition"></a></dt>
+<dd><p>Overloaded function.</p>
+<ol class="arabic simple">
+<li><p><code class="docutils literal notranslate"><span
class="pre">update(self,</span> <span class="pre">item:</span> <span
class="pre">float)</span> <span class="pre">-></span> <span
class="pre">None</span></code></p></li>
+</ol>
+<p>Updates the sketch with the given value</p>
+<ol class="arabic simple" start="2">
+<li><p><code class="docutils literal notranslate"><span
class="pre">update(self,</span> <span class="pre">array:</span> <span
class="pre">ndarray[dtype=float64])</span> <span class="pre">-></span> <span
class="pre">None</span></code></p></li>
+</ol>
+<p>Updates the sketch with the values in the given array</p>
+</dd></dl>
+
+</dd></dl>
+
+</section>
+
+
+ </div>
+ </div>
+ <footer><div class="rst-footer-buttons" role="navigation"
aria-label="Footer">
+ <a href="req.html" class="btn btn-neutral float-left" title="Relative
Error Quantiles (REQ) Sketch" accesskey="p" rel="prev"><span class="fa
fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+ <a href="quantiles_depr.html" class="btn btn-neutral float-right"
title="Quantiles Sketch (Deprecated)" accesskey="n" rel="next">Next <span
class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+ </div>
+
+ <hr/>
+
+ <div role="contentinfo">
+ <p>© Copyright 2023.</p>
+ </div>
+
+ Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
+ <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
+ provided by <a href="https://readthedocs.org">Read the Docs</a>.
+
+
+</footer>
+ </div>
+ </div>
+ </section>
+ </div>
+ <script>
+ jQuery(function () {
+ SphinxRtdTheme.Navigation.enable(true);
+ });
+ </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/main/sampling/ebpps.html b/docs/main/sampling/ebpps.html
index b8540b7..b9d92f7 100644
--- a/docs/main/sampling/ebpps.html
+++ b/docs/main/sampling/ebpps.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Exact and Bounded, Probabilitiy Proportional to Size (EBPPS) Sampling
— datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/sampling/index.html b/docs/main/sampling/index.html
index 9897f1c..8bb6435 100644
--- a/docs/main/sampling/index.html
+++ b/docs/main/sampling/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Random Sampling Sketches — datasketches 0.1
documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/sampling/varopt.html b/docs/main/sampling/varopt.html
index 53afc9e..69bec5c 100644
--- a/docs/main/sampling/varopt.html
+++ b/docs/main/sampling/varopt.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Variance Optimal Sampling (VarOpt) — datasketches 0.1
documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/search.html b/docs/main/search.html
index 46fb1b6..d26add3 100644
--- a/docs/main/search.html
+++ b/docs/main/search.html
@@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/searchindex.js b/docs/main/searchindex.js
index 8efec65..02602e7 100644
--- a/docs/main/searchindex.js
+++ b/docs/main/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"Apache DataSketches": [[14, null]],
"Compressed Probabilistic Counting (CPC)": [[0, null]], "CountMin Sketch": [[5,
null]], "Counting Distincts": [[14, "counting-distincts"]], "Density Sketch":
[[22, null]], "Distinct Counting": [[2, null]], "Exact and Bounded,
Probabilitiy Proportional to Size (EBPPS) Sampling": [[19, null]], "Frequency
Sketches": [[7, null], [14, "frequency-sketches"]], "Frequent Items": [[6,
null]], "Helper Classes": [[8, null], [14, "h [...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"Apache DataSketches": [[14, null]],
"Compressed Probabilistic Counting (CPC)": [[0, null]], "CountMin Sketch": [[5,
null]], "Counting Distincts": [[14, "counting-distincts"]], "Density Sketch":
[[23, null]], "Distinct Counting": [[2, null]], "Exact and Bounded,
Probabilitiy Proportional to Size (EBPPS) Sampling": [[20, null]], "Frequency
Sketches": [[7, null], [14, "frequency-sketches"]], "Frequent Items": [[6,
null]], "Helper Classes": [[8, null], [14, "h [...]
\ No newline at end of file
diff --git a/docs/main/vector/density_sketch.html
b/docs/main/vector/density_sketch.html
index aa3d6f2..8dbb796 100644
--- a/docs/main/vector/density_sketch.html
+++ b/docs/main/vector/density_sketch.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Density Sketch — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
diff --git a/docs/main/vector/index.html b/docs/main/vector/index.html
index e3e7fc3..56c6d44 100644
--- a/docs/main/vector/index.html
+++ b/docs/main/vector/index.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vector Sketches — datasketches 0.1 documentation</title>
- <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=80d5e7a1" />
+ <link rel="stylesheet" type="text/css"
href="../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css"
href="../_static/css/theme.css?v=e59714d7" />
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]