cdp: L1 convex clustering with a single lambda.

Description Usage Arguments Details Value Examples

View source: R/cdp.R

Description

L1 convex clustering with a single lambda.

Usage

1
cdp(X, lam)

Arguments

X

a data matrix of n * p or a data vector with length n.

lam

a tuning parameter.

Details

A list with length p equal to the dimension of the data matrix. Each dimension includes a vector of the estimated centroids.

Value

the estimated centroids.

Examples

1
2
3
4
5
# 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)

dpcc documentation built on June 1, 2021, 9:08 a.m.

Related to cdp in dpcc...