clusterpath.l2 {clusterpath}R Documentation

clusterpath l2

Description

Cluster a matrix of data using the L2 penalty and fused group lasso.

Usage

clusterpath.l2(x, ...)

Arguments

x

Matrix of data to cluster.

...

passed to clusterpath.l2.general

Author(s)

Toby Dylan Hocking

Examples

## cluster the iris data
path <- clusterpath.l2(iris[,1:4],gamma=1,verbose=1)
plot(path,groups=iris$Species)
## compare with l1 path
bpts <- clusterpath.l1.id(iris[,1:4])
plot(bpts)
bpts4d <- castbreakpoints(bpts)
solutions <- rbind(bpts4d,path)
ggplot(solutions,aes(Petal.Length,Petal.Width))+
  geom_path(aes(group=interaction(row,solver),colour=norm))

[Package clusterpath version 1.2 Index]