(index-sets v->idx coll)
Given a mapping of values to indexes and a collection of sets, returns a new collection of sets where each set has have their values replaced by indexes
Given a mapping of values to indexes and a collection of sets, returns a new collection of sets where each set has have their values replaced by indexes
(nearest similar s)
(nearest similar
s
n
&
{:keys [threshold exact?] :or {threshold 0.0 exact? true}})
Given a similar
data structure and a target set s
, finds the
nearest matching set. Optionally takes a parameter n
for the n
nearest sets. Pass threshold
as an optional arguments to filter
elements with a jaccard index below the threshold. By default this
is calculated exactly, pass exact? false
to
use the approximate MinHash jaccard index instead. Returning sets have distance
metrics and vector associated as metadata.
Given a `similar` data structure and a target set `s`, finds the nearest matching set. Optionally takes a parameter `n` for the `n` nearest sets. Pass `threshold` as an optional arguments to filter elements with a jaccard index below the threshold. By default this is calculated exactly, pass `exact? false` to use the approximate MinHash jaccard index instead. Returning sets have distance metrics and vector associated as metadata.
(similar coll)
(similar coll error)
Constructs a new similar set from a collection of sets.
Can be used for lookup of nearest sets using nearest
.
Optionally takes a target similarity estimate error (default 0.1).
Constructs a new similar set from a collection of sets. Can be used for lookup of nearest sets using `nearest`. Optionally takes a target similarity estimate error (default 0.1).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close