knn_weights: "Thin" a weight vector to be positive only for its k-nearest...

Description Usage Arguments Value Author(s)

Description

knn_weights takes a weight vector w and sets the ith component w[i] to zero if either of the two corresponding nodes is not among the other's k nearest neighbors.

Usage

1
knn_weights(w, k, n)

Arguments

w

A vector of nonnegative weights. The ith entry w[i] denotes the weight used between the ith pair of centroids. The weights are in dictionary order.

k

The number of nearest neighbors

n

The number of data points.

Value

A vector w of weights for convex clustering.

Author(s)

Eric C. Chi, Kenneth Lange


cvxclustr documentation built on May 2, 2019, 3:44 p.m.