Basic statistical computations on frequency maps. A frequency map (freq-map) is a map from observed values to their frequency in a data set.
If the observed values are all integers within a small range, then a frequency map may be exact, such as that returned by clojure.core/frequencies. Floating-point values or a large range of integers can be grouped into 'buckets' as in a histogram: the 'bucket-frequencies' function does this.
You can create your own bucketed frequency map (for example, as part of a larger 'reduce' operation) using the functions 'bucket' and 'recover-bucket-keys'.
Basic statistical computations on frequency maps. A frequency map (freq-map) is a map from observed values to their frequency in a data set. If the observed values are all integers within a small range, then a frequency map may be exact, such as that returned by clojure.core/frequencies. Floating-point values or a large range of integers can be grouped into 'buckets' as in a histogram: the 'bucket-frequencies' function does this. You can create your own bucketed frequency map (for example, as part of a larger 'reduce' operation) using the functions 'bucket' and 'recover-bucket-keys'.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close