You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ The tests are thorough.
28
28
*`original.py` were written during development to test all features as they were added.
29
29
*`autogenerated.py` is from the language-independent testing suite ([histogrammar-multilang](https://github.com/histogrammar/histogrammar-multilang)), which provides greater coverage, value-explicitness in the test script, and cross-language agreement.
30
30
*`testnumpy.py` tests numerical agreement between the conventional implementation and the Numpy implementation, which are very different. Also tests much larger datasets and infinity/NaN handling.
31
+
* contrary to its name, `testnumpy.py` also compares its implementation with the literal code given in [the specification](http://histogrammar.org/docs/specification/) as well.
31
32
32
33
Primitive implementation is mature. Notes in the "Numpy" column are rough speedup factors for a range of tests.
33
34
@@ -37,23 +38,19 @@ Primitive implementation is mature. Notes in the "Numpy" column are rough speedu
Copy file name to clipboardExpand all lines: histogrammar/primitives/centrallybin.py
+5-210Lines changed: 5 additions & 210 deletions
Original file line number
Diff line number
Diff line change
@@ -26,38 +26,28 @@ class CentrallyBin(Factory, Container):
26
26
"""Split a quantity into bins defined by irregularly spaced bin centers, with exactly one sub-aggregator filled per datum (the closest one).
27
27
28
28
Unlike irregular bins defined by explicit ranges, irregular bins defined by bin centers are guaranteed to fully partition the space with no gaps and no overlaps. It could be viewed as cluster scoring in one dimension.
29
-
30
-
The first and last bins cover semi-infinite domains, so it is unclear how to interpret them as part of the probability density function (PDF). Finite-width bins approximate the PDF in piecewise steps, but the first and last bins could be taken as zero (an underestimate) or as uniform from the most extreme point to the inner bin edge (an overestimate, but one that is compensated by underestimating the region just beyond the extreme point). For the sake of the latter interpretation, the minimum and maximum values are accumulated along with the bin values.
31
29
"""
32
30
33
31
@staticmethod
34
-
defed(entries, bins, min, max, nanflow):
32
+
defed(entries, bins, nanflow):
35
33
"""Create a CentrallyBin that is only capable of being added.
36
34
37
35
Parameters:
38
36
entries (float): the number of entries.
39
37
bins (list of float, :doc:`Container <histogrammar.defs.Container>` pairs): the list of bin centers and their accumulated data.
40
-
min (float): the lowest value of the quantity observed or NaN if no data were observed.
41
-
max (float): the highest value of the quantity observed or NaN if no data were observed.
42
38
nanflow (:doc:`Container <histogrammar.defs.Container>`): the filled nanflow bin.
0 commit comments