(average-target hist p)
Returns the average (or expected) target for the given point.
Returns the average (or expected) target for the given point.
(bin-count hist)
Returns the current number of bins.
Returns the current number of bins.
(bins hist)
Returns the bins contained in the histogram. A missing bin (mean is nil) is included if it's non-empty.
Returns the bins contained in the histogram. A missing bin (mean is nil) is included if it's non-empty.
(bounds hist)
Returns the bounds of the histogram, nil if the histogram is empty.
Returns the bounds of the histogram, nil if the histogram is empty.
(cdf hist)
Returns the cumulative distribution function for the histogram.
Returns the cumulative distribution function for the histogram.
(clj-to-hist hist-map)
Transforms a Clojure map representing a histogram into a Histogram object.
Transforms a Clojure map representing a histogram into a Histogram object.
(create &
{:keys [bins gap-weighted? categories group-types freeze reservoir]
:or {bins 64 gap-weighted? false}})
Creates a histogram.
Optional parameters: :bins - Maximum bins to be used by the histogram (default 64) :gap-weighted? - Use gap weighting (true or false - default false) :categories - Collection of valid categories (improves performance) :group-types - A sequence of types (:numeric or :categorical) that describing a group target. :freeze - After this # of inserts, bin locations will 'freeze', improving the performance of future inserts. :reservoir - Selects the bin reservoir type (:array or :tree). Defaults to :array for <= 256 bins, otherwise :tree.
Creates a histogram. Optional parameters: :bins - Maximum bins to be used by the histogram (default 64) :gap-weighted? - Use gap weighting (true or false - default false) :categories - Collection of valid categories (improves performance) :group-types - A sequence of types (:numeric or :categorical) that describing a group target. :freeze - After this # of inserts, bin locations will 'freeze', improving the performance of future inserts. :reservoir - Selects the bin reservoir type (:array or :tree). Defaults to :array for <= 256 bins, otherwise :tree.
(density hist p)
Returns an estimate of the histogram's density at the given point.
Returns an estimate of the histogram's density at the given point.
(extended-density hist p)
Returns an estimate of the histogram's density at the given point, along with the density of the targets.
Returns an estimate of the histogram's density at the given point, along with the density of the targets.
(extended-sum hist p)
Returns the approximate number of points occuring in the histogram equal or less than the given point, along with the sum of the targets.
Returns the approximate number of points occuring in the histogram equal or less than the given point, along with the sum of the targets.
(group-types hist)
Returns the group types of the histogram.
Returns the group types of the histogram.
(hist-to-clj hist)
Transforms a Histogram object into a Clojure map representing the histogram.
Transforms a Histogram object into a Clojure map representing the histogram.
(histogram? hist)
Returns true if the input is a histogram.
Returns true if the input is a histogram.
Inserts a point and an optional target into the histogram. The point must be a number and the target may be a number, string, keyword, or collection of the previous targets.
Inserts a point and an optional target into the histogram. The point must be a number and the target may be a number, string, keyword, or collection of the previous targets.
(insert-bin! hist bin)
Inserts a bin into the histogram.
Inserts a bin into the histogram.
(insert-categorical! hist p v)
Inserts a point with a categorical target into the histogram.
Inserts a point with a categorical target into the histogram.
(insert-group! hist p v)
Inserts a point with a group target into the histogram.
Inserts a point with a group target into the histogram.
(insert-numeric! hist p v)
Inserts a point with a categorical target into the histogram.
Inserts a point with a categorical target into the histogram.
(insert-simple! hist p)
Inserts a point into the histogram (no target).
Inserts a point into the histogram (no target).
(max-bins hist)
Returns the maximum allowed bins for the histogram.
Returns the maximum allowed bins for the histogram.
(maximum hist)
Returns the maximum value inserted into the histogram.
Returns the maximum value inserted into the histogram.
(mean hist)
Returns the mean over the points inserted into the histogram.
Returns the mean over the points inserted into the histogram.
(median hist)
Returns a median for the points inserted into the histogram. This will be the true median whenever the histogram has less than the maximum number of bins, otherwise it will be an approximation.
Returns a median for the points inserted into the histogram. This will be the true median whenever the histogram has less than the maximum number of bins, otherwise it will be an approximation.
(merge! hist1 hist2)
Merges the second histogram into the first.
Merges the second histogram into the first.
(minimum hist)
Returns the minimum value inserted into the histogram.
Returns the minimum value inserted into the histogram.
(missing-bin hist)
Retrieves information about inserts with missing input points.
Retrieves information about inserts with missing input points.
(pdf hist)
Returns the probability density function for the histogram.
Returns the probability density function for the histogram.
(percentiles hist & percentiles)
Returns a map of percentiles and their associated locations.
Returns a map of percentiles and their associated locations.
(sample hist & [sample-size])
Returns a sequence of samples from the distribution approximated by the histogram.
Returns a sequence of samples from the distribution approximated by the histogram.
(sum hist p)
Returns the approximate number of points occuring in the histogram equal or less than the given point.
Returns the approximate number of points occuring in the histogram equal or less than the given point.
(target-type hist)
Returns the target-type of the histogram.
Returns the target-type of the histogram.
(total-count hist)
Returns the count of the points summarized by the histogram.
Returns the count of the points summarized by the histogram.
(total-target-sum hist)
Returns the sum of the targets for each bin in the histogram.
Returns the sum of the targets for each bin in the histogram.
(uniform hist max-bins)
Returns the split points that would separate the histogram into the supplied number of bins with equal population.
Returns the split points that would separate the histogram into the supplied number of bins with equal population.
(variance hist)
Returns an estimate of the variance for the histogram.
Returns an estimate of the variance for the histogram.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close