Liking cljdoc? Tell your friends :D

active-analytics.clustering.pic


create-affinity-matrix!clj

(create-affinity-matrix! data distance-fn)

Creates an affinity matrix from data and a function that calculates the distance between two data points.

Creates an affinity matrix from `data` and a function
that calculates the distance between two data points.
sourceraw docstring

create-normalized-affinity-matrix!clj

(create-normalized-affinity-matrix! data distance-fn)

Creates a normalized affinity matrix from data and a function that calculates the distance between two data points.

Creates a normalized affinity matrix from `data` and a
function that calculates the distance between two data points.
sourceraw docstring

degree-matrixclj

(degree-matrix m)

Calculates the degree matrix of a matrix m. This is a diagonal matrix where the entry of each row is the row sum of the corresponding row of m.

Calculates the degree matrix of a matrix `m`.
This is a diagonal matrix where the entry of each row
is the row sum of the corresponding row of `m`.
sourceraw docstring

initial-vectorclj

(initial-vector affinity-matrix & {:keys [range?] :or {range? true}})

Creates an initial vector for PIC clustering. So far, using a range (thus treating each point as if it were in its own cluster) over the proposed weighted initial vector has proven more fruitful.

Creates an initial vector for PIC clustering.
So far, using a range (thus treating each point as
if it were in its own cluster) over the proposed
weighted initial vector has proven more fruitful.
sourceraw docstring

normalize-affinity-matrixclj

(normalize-affinity-matrix m)

Normalizes an affinity matrix by dividing each entry by its row sum.

Normalizes an affinity matrix by dividing each entry
by its row sum.
sourceraw docstring

picclj

(pic affinity-matrix k max-number-of-iterations)

Performs power iteration clustering with an affinity-matrix, the desired number of clusters k, and a number of iterations and threshold which determine when to terminate the algorithm.

Performs power iteration clustering with an `affinity-matrix`,
the desired number of clusters `k`, and a number of iterations
and threshold which determine when to terminate the algorithm.
sourceraw docstring

pic-onlyclj

(pic-only affinity-matrix max-number-of-iterations)

Performs 'pure' power iteration clustering, that is, without using another clustering algorithm on the result. Hence this returns a real-valued vector with the same dimension as affinity-matrix.

Performs 'pure' power iteration clustering, that is,
without using another clustering algorithm on the result.
Hence this returns a real-valued vector with the same
dimension as `affinity-matrix`.
sourceraw docstring

scaleclj

(scale v)

Calculates the 'scale' of a vector v. This is the difference between the greatest and the smallest vector entry.

Calculates the 'scale' of a vector `v`.
This is the difference between the greatest and the
smallest vector entry.
sourceraw docstring

stepclj

(step affinity-matrix v)

Given a (normalized) affinity matrix and a vector v, calculate the next vector by using power iteration.

Given a (normalized) affinity matrix and a vector `v`,
calculate the next vector by using power iteration.
sourceraw docstring

thresholdclj

(threshold number-of-data-points)

Calculates a threshold which can be used to determine when to stop the power iteration, that is, when local convergence has been reached.

Calculates a threshold which can be used to determine
when to stop the power iteration, that is, when local
convergence has been reached.
sourceraw docstring

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

× close