cdp {dpcc} | R Documentation |
L1 convex clustering with a single lambda.
cdp(X, lam)
X |
a data matrix of n * p or a data vector with length n. |
lam |
a tuning parameter. |
A list with length p equal to the dimension of the data matrix. Each dimension includes a vector of the estimated centroids.
the estimated centroids.
# generate a data matrix with n = 10 and p = 2.
X = matrix(rnorm(10*2), 10, 2)
lam = find_lambda(X)/2
# set a tuning parameter lambda.
cdp(X, lam)