Liking cljdoc? Tell your friends :D

babbage.core


bin-histogram-plotclj

source

byclj

(by extractor field-name sfunc1 & sfuncs)

Allows passing whole records to a stats function within a call to stats. Similar to map-with-key and map-with-value, but without creating a map.

Allows passing whole records to a stats function within a call to
stats. Similar to map-with-key and map-with-value, but without
creating a map.
sourceraw docstring

calculateclj

(calculate sets-fn fields input)
source

complementclj

(complement f__6599__auto__ key & [complement-key])

Add the complement of the subset named by key. If complement-key is provided that will be used as the name of the complement; otherwise "not-" will be prefixed to key.

Add the complement of the subset named by key. If complement-key is
provided that will be used as the name of the complement; otherwise
"not-" will be prefixed to key.
sourceraw docstring

countclj

source

count-binnedclj

source

count-uniqueclj

source

defstatfncljmacro

(defstatfn fn-name monoidfn & {:keys [requires name doc]})

Define a function for computing statistics suitable for passing as an argument to stats. Same as statfn, except that def is used to create a var holding the function, and there is an additional :doc optional argument for supplying a docstring.

Define a function for computing statistics suitable for passing as
an argument to stats. Same as statfn, except that def is used to
create a var holding the function, and there is an additional :doc
optional argument for supplying a docstring.
sourceraw docstring

dependenceclj

(dependence & independent-fns)
source

gaussianclj

source

histogramclj

(histogram width)
source

histogram-plotclj

(histogram-plot width)
source

intersectclj

(intersect f__6599__auto__ key1 & keys)

Add the intersection of two or more subsets, named by the key arguments, to the set given by the first argument. The resulting intersection will be named :Sx-and-y-and-...-and-zZ, where x, y, ... z are the names of the argument sets.

Add the intersection of two or more subsets, named by the key
arguments, to the set given by the first argument. The resulting
intersection will be named :Sx-and-y-and-...-and-zZ, where x, y, ... z
are the names of the argument sets.
sourceraw docstring

intersection-nameclj

(intersection-name & keys)
source

intersectionsclj

(intersections s & keyseqs)

Created nested intersections of the set, using the cross-products of pairs of the provided keys, starting with the innermost:

(intersections s :foo [:bar :baz] [[:quux :frob] :spam])

creates the following subsets, in this order:

Sbar-and-quux-and-frobZ Sbar-and-spamZ Sbaz-and-quux-and-frobZ Sbaz-and-spamZ Sfoo-and-bar-and-quux-and-frobZ Sfoo-and-bar-and-spamZ Sfoo-and-baz-and-quux-and-frobZ Sfoo-and-baz-and-spamZ

Created nested intersections of the set, using the
cross-products of pairs of the provided keys, starting with the
innermost:

(intersections s :foo [:bar :baz] [[:quux :frob] :spam])

creates the following subsets, in this order:

Sbar-and-quux-and-frobZ
Sbar-and-spamZ
Sbaz-and-quux-and-frobZ
Sbaz-and-spamZ
Sfoo-and-bar-and-quux-and-frobZ
Sfoo-and-bar-and-spamZ
Sfoo-and-baz-and-quux-and-frobZ
Sfoo-and-baz-and-spamZ
sourceraw docstring

linregclj

(linreg & independent-fns)
source

listclj

source

make-set-function-nameclj

(make-set-function-name logical-operation-name keys)

(make-set-function-name "and" [:a :b :c]) -> :Sa-and-b-and-cZ

(make-set-function-name "and" [:a :b :c]) -> :Sa-and-b-and-cZ
sourceraw docstring

map-ofclj

(map-of type extractor field-name sfunc1 & sfuncs)

Add a map named field-name to the result map. With type :key, as map-with-key; with type :value, as map-with-value.

Add a map named field-name to the result map. With type :key, as
map-with-key; with type :value, as map-with-value.
sourceraw docstring

map-with-keyclj

(map-with-key key-extractor field-name value-sfunc1 & value-sfuncs)

Add a map named field-name to the result map. The keys for the map are computed using key-extractor. The values are drawn from the extractor passed to the enclosing stats call, and the remaining arguments are, as in stats, at least one function for computing statistics.

The function for computing the key receives the whole record the statistics are calculated for.

Example: If records have the structure

{:type [keyword], :balance [number]}

Then

(stats :balance mean (map-with-key :type :type->balance mean))

Computes the mean of all balances, and a map keyed by type whose values contain the means of balances for that type:

{:mean 40, :type->balance {:foo {:mean 20}, :bar {:mean 56}}}

Add a map named field-name to the result map. The keys for the map
are computed using key-extractor. The values are drawn from the
extractor passed to the enclosing stats call, and the remaining
arguments are, as in stats, at least one function for computing
statistics.

The function for computing the key receives the whole record the
statistics are calculated for.

Example: If records have the structure

   {:type [keyword], :balance [number]}

Then

   (stats :balance mean (map-with-key :type :type->balance mean))

Computes the mean of all balances, and a map keyed by type whose
values contain the means of balances for that type:

  {:mean 40, :type->balance {:foo {:mean 20}, :bar {:mean 56}}}
sourceraw docstring

map-with-valueclj

(map-with-value value-extractor field-name value-sfunc1 & value-sfuncs)

Add a map named field-name to the result map. The values for the map are computed using value-extractor. The keys are drawn from the extractor passed to the enclosing stats call, and the remaining arguments are, as in stats, at least one function for computing statistics.

The function for computing the value receives the whole record the statistics are calculated for.

Example: if records have the strucutre

{:type [keyword], :balance [number]}

Then

(stats :type count-binned (map-with-value :balance :type->balance mean))

Computes the number of records per type, and the mean of the balances per type:

{:count-binned {:foo 20, :bar 13}, :type->balance {:foo {:mean 20}, :bar {:mean 56}}}

Add a map named field-name to the result map. The values for the
map are computed using value-extractor. The keys are drawn from the
extractor passed to the enclosing stats call, and the remaining
arguments are, as in stats, at least one function for computing
statistics.

The function for computing the value receives the whole record the
statistics are calculated for.

Example: if records have the strucutre

   {:type [keyword], :balance [number]}

Then

   (stats :type count-binned (map-with-value :balance :type->balance mean))

Computes the number of records per type, and the mean of the
balances per type:

  {:count-binned {:foo 20, :bar 13}, :type->balance {:foo {:mean 20}, :bar {:mean 56}}}
sourceraw docstring

maxclj

source

meanclj

source

minclj

source

pearsonclj

source

prepare-mapclj

(prepare-map m)
source

prodclj

source

ratioclj

(ratio of to & [ratio-name])
sourceraw docstring

scatter-plotclj

source

setclj

source

setsclj

(sets)
(sets pred-map)

Describe subsets for which to calculate statistics.

The argument, if given, should be a map whose keys are subset names and whose values are predicates members of the subset should satisfy. An additional set, with the key :all and containing everything, will also be calculated.

If no argument is given, only the :all set will be calculated.

Describe subsets for which to calculate statistics.

The argument, if given, should be a map whose keys are subset names
and whose values are predicates members of the subset should
satisfy. An additional set, with the key :all and containing
everything, will also be calculated.

If no argument is given, only the :all set will be calculated.
sourceraw docstring

statfncljmacro

(statfn fn-name monoidfn & {:keys [requires name]})

Create a function for computing statistics suitable for passing as an argument to stats. "monoidfn" should be the underlying function that combines values. The computed value will be inserted in the result map with the same name as fn-name or, if it is provided, the value of the :name optional argument. The :requires optional argument should contain the names of the functions that monoidfn expects already to have run.

Functions that are more than just simple wrappers will probably not be able to use this macro: see e.g. ratio or map-{with-key,with-value,of}.

Create a function for computing statistics suitable for passing as
an argument to stats. "monoidfn" should be the underlying function
that combines values. The computed value will be inserted in the
result map with the same name as fn-name or, if it is provided, the
value of the :name optional argument. The :requires optional
argument should contain the names of the functions that monoidfn
expects already to have run.

Functions that are more than just simple wrappers will probably not
be able to use this macro: see e.g. ratio or
map-{with-key,with-value,of}.
sourceraw docstring

statsclj

(stats extractor stat-func1 & stats-funcs)

Create a function for calculating groups of statistics.

Arguments are an extractor function and at least one statistical function.

The return value is a function of one argument. The result of calling the extractor function on this argument is then passed to the statistical functions.

For instance, (stats :x sum count max) will return a function that expects a map with an :x key and tallies the sum, count, and max the :x values:

(m/value ((stats :x sum count max) {:x 1})) {:sum 1 :count 1 :max 1}

It is not in general necessary to call the return value of this function directly.

Create a function for calculating groups of statistics.

Arguments are an extractor function and at least one statistical
function.

The return value is a function of one argument. The result of
calling the extractor function on this argument is then passed to
the statistical functions.

For instance, (stats :x sum count max) will return a function that
expects a map with an :x key and tallies the sum, count, and max
the :x values:

> (m/value ((stats :x sum count max) {:x 1}))
{:sum 1 :count 1 :max 1}

It is not in general necessary to call the return value of this function directly.
sourceraw docstring

sumclj

source

unionclj

(union f__6599__auto__ key1 & keys)

Add the union of two or more subsets, named by the key arguments, to the set given by the first argument. The resulting union will be named :Sx-or-y-or-...-or-zZ, where x, y, ... z are the names of the argument sets.

Add the union of two or more subsets, named by the key arguments,
to the set given by the first argument. The resulting union will be
named :Sx-or-y-or-...-or-zZ, where x, y, ... z are the names of the
argument sets.
sourceraw docstring

union-nameclj

(union-name & keys)
source

unionsclj

(unions s & keyseqs)

Created nested unions of the set, using the cross-products of pairs of the provided keys, starting with the innermost:

(unions s :foo [:bar :baz] [[:quux :frob] :spam])

creates the following subsets, in this order:

Sbar-or-quux-or-frobZ Sbar-or-spamZ Sbaz-or-quux-or-frobZ Sbaz-or-spamZ Sfoo-or-bar-or-quux-or-frobZ Sfoo-or-bar-or-spamZ Sfoo-or-baz-or-quux-or-frobZ Sfoo-or-baz-or-spamZ

Created nested unions of the set, using the
cross-products of pairs of the provided keys, starting with the
innermost:

(unions s :foo [:bar :baz] [[:quux :frob] :spam])

creates the following subsets, in this order:

Sbar-or-quux-or-frobZ
Sbar-or-spamZ
Sbaz-or-quux-or-frobZ
Sbaz-or-spamZ
Sfoo-or-bar-or-quux-or-frobZ
Sfoo-or-bar-or-spamZ
Sfoo-or-baz-or-quux-or-frobZ
Sfoo-or-baz-or-spamZ
sourceraw docstring

vector-spaceclj

source

xgetclj

(xget data sets & ks)

Enables fetching of a value across multiple sets.

Enables fetching of a value across multiple sets.
sourceraw docstring

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

× close