(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.
(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.
(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`.
(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.
(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.
(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.
(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`.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close