Liking cljdoc? Tell your friends :D

taoensso.tufte.stats

Stats stuff. Private ns, implementation detail.

Stats stuff.
Private ns, implementation detail.
raw docstring

all-format-columnsclj/s

source

bessel-correctionclj/s

(bessel-correction n add)
source

default-format-columnsclj/s

source

default-format-id-fnclj/s

source

doubles?clj

(doubles? x)

Returns true iff given double array

Returns true iff given double array
sourceraw docstring

get-max-id-widthclj/s

(get-max-id-width id-sstats*
                  {:keys [format-id-fn]
                   :or {format-id-fn default-format-id-fn}})
source

is-pclj/s

(is-p x)
source

ISummaryStatsBufferedclj/sprotocol

ssb-clearclj/s

(ssb-clear _)

Clears all internal state and returns nil.

Clears all internal state and returns nil.

ssb-derefclj/s

(ssb-deref _)
(ssb-deref _ flush-buffer?)

Returns current ?sstats.

Returns current ?sstats.

ssb-flushclj/s

(ssb-flush _)

Flushes internal buffer and returns newly merged sstats or nil.

Flushes internal buffer and returns newly merged sstats or nil.

ssb-pushclj/s

(ssb-push _ n)

Adds given num to internal buffer.

Adds given num to internal buffer.
source

longs?clj

(longs? x)

Returns true iff given long array

Returns true iff given long array
sourceraw docstring

multi-reduceclj/s

(multi-reduce f init coll)
(multi-reduce f1 init1 f2 init2 coll)
(multi-reduce f1 init1 f2 init2 f3 init3 coll)

Like reduce but supports separate simultaneous accumulators as a micro-optimisation when reducing a large collection multiple times.

Like `reduce` but supports separate simultaneous accumulators
as a micro-optimisation when reducing a large collection multiple
times.
sourceraw docstring

percentileclj/s

(percentile nums p)

Returns ?double

Returns ?double
sourceraw docstring

percentilesclj/s

(percentiles nums)

Returns ?[min p25 p50 p75 p90 p95 p99 max] doubles in:

  • O(1) for Sorted types (SortedLongs, SortedDoubles),
  • O(n.log_n) otherwise.
Returns ?[min p25 p50 p75 p90 p95 p99 max] doubles in:
- O(1) for Sorted types (SortedLongs, SortedDoubles),
- O(n.log_n) otherwise.
sourceraw docstring

rf-sumclj/s

(rf-sum acc in)
source

rf-sum-abs-deviationclj/s

(rf-sum-abs-deviation central-point acc x)
source

rf-sum-varianceclj/s

(rf-sum-variance xbar acc x)
source

sorted-doublesclj/s

(sorted-doubles nums)
source

sorted-doubles?clj/s

(sorted-doubles? x)
source

summary-statsclj/s

(summary-stats nums-or-ss-map)

Given a coll of numbers or previously dereffed SummaryStats map, returns a new mergeable ?SummaryStats with: (deref ss) => {:keys [n min max p25 ... p99 mean var mad]}

See also summary-stats-merge.

Given a coll of numbers or previously dereffed SummaryStats map,
returns a new mergeable ?SummaryStats with:
  (deref ss) => {:keys [n min max p25 ... p99 mean var mad]}

See also `summary-stats-merge`.
sourceraw docstring

summary-stats-bufferedclj/s

(summary-stats-buffered)
(summary-stats-buffered {:keys [buffer-size buffer-init sstats-init merge-cb]
                         :or {buffer-size 100000.0}
                         :as opts})

Returns a new stateful SummaryStatsBuffered with: (ssb <num>) => Adds given number to internal buffer. (deref ssb) => Flushes buffer if necessary, and returns a mergeable ?SummaryStats. Deref again to get a map of summary stats for all numbers ever added to ssb: {:keys [n min max p25 ... p99 mean var mad]}.

Useful for summarizing a (possibly infinite) stream of numbers.

Options: :buffer-size - The maximum number of numbers that may be buffered before next (ssb <num>) call will block to flush buffer and merge with any existing summary stats.

             Larger buffers mean better performance and more
             accurate stats, at the cost of more memory use
             while buffering.

:buffer-init - Initial buffer content, useful for persistent ssb. :sstats-init - Initial summary stats, useful for persistent ssb.

Returns a new stateful SummaryStatsBuffered with:
  (ssb <num>) => Adds given number to internal buffer.
  (deref ssb) => Flushes buffer if necessary, and returns a mergeable
                 ?SummaryStats. Deref again to get a map of summary
                 stats for all numbers ever added to ssb:
                   {:keys [n min max p25 ... p99 mean var mad]}.

Useful for summarizing a (possibly infinite) stream of numbers.

Options:
  :buffer-size - The maximum number of numbers that may be buffered
                 before next (ssb <num>) call will block to flush
                 buffer and merge with any existing summary stats.

                 Larger buffers mean better performance and more
                 accurate stats, at the cost of more memory use
                 while buffering.

  :buffer-init - Initial buffer content, useful for persistent ssb.
  :sstats-init - Initial summary stats,  useful for persistent ssb.
sourceraw docstring

summary-stats-buffered-fastclj/s

(summary-stats-buffered-fast buffer-size merge-cb)

Returns fastest possible SummaryStatsBuffered.

Returns fastest possible SummaryStatsBuffered.
sourceraw docstring

summary-stats-buffered?clj/s

(summary-stats-buffered? x)

Returns true iff given a SummaryStatsBuffered instance.

Returns true iff given a SummaryStatsBuffered instance.
sourceraw docstring

summary-stats-clear!clj/s

(summary-stats-clear! stateful-summary-stats)

Clears internal state (incl. stats and buffers, etc.) for given stateful SummaryStats instance and returns nil.

Clears internal state (incl. stats and buffers, etc.) for given
stateful SummaryStats instance and returns nil.
sourceraw docstring

summary-stats-formatclj/s

(summary-stats-format clock-total
                      id-sstats*
                      {:keys [columns sort-fn format-id-fn max-id-width]
                       :as opts
                       :or {columns default-format-columns
                            sort-fn (fn [ss] (get (enc/force-ref ss) :sum))
                            format-id-fn default-format-id-fn}})

Given {<id> <sstats>} or {<id> <sstats-map>}, returns a formatted table string. Assumes nanosecond clock, and stats based on profiling id'd nanosecond times.

Given {<id> <sstats>} or {<id> <sstats-map>}, returns a formatted table
string. Assumes nanosecond clock, and stats based on profiling id'd
nanosecond times.
sourceraw docstring

summary-stats-mergeclj/s

(summary-stats-merge ss1)
(summary-stats-merge ss1 ss2)

Given one or more SummaryStats, returns a new ?SummaryStats with: (summary-stats-merge (summary-stats nums1) (summary-stats nums2))

an approximatation of (summary-stats (merge nums1 nums2))

Useful when you want summary stats for a large coll of numbers for which it would be infeasible/expensive to keep all numbers for accurate merging.

Given one or more SummaryStats, returns a new ?SummaryStats with:
  (summary-stats-merge
     (summary-stats nums1)
     (summary-stats nums2))

  an approximatation of (summary-stats (merge nums1 nums2))

Useful when you want summary stats for a large coll of numbers for which
it would be infeasible/expensive to keep all numbers for accurate merging.
sourceraw docstring

summary-stats-stateful?clj/s

(summary-stats-stateful? x)

Returns true iff given a stateful SummaryStats instance.

Returns true iff given a stateful SummaryStats instance.
sourceraw docstring

summary-stats?clj/s

(summary-stats? x)

Returns true iff given a SummaryStats argument.

Returns true iff given a SummaryStats argument.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close