powered by
L1 convex clustering with a single lambda.
cdp(X, lam)
a data matrix of n * p or a data vector with length n.
a tuning parameter.
the estimated centroids.
A list with length p equal to the dimension of the data matrix. Each dimension includes a vector of the estimated centroids.
# NOT RUN { # 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) # }
Run the code above in your browser using DataLab