| iris.l1.cluster {directlabels} | R Documentation |
Clustering of the iris data with the l1 clusterpath
Description
The l1 clustering algorithm from the clusterpath package was applied to the iris dataset and the breakpoints in the solution path are stored in this data frame.
Usage
data(iris.l1.cluster)
Format
A data frame with 9643 observations on the following 8 variables.
rowa numeric vector: row of the original iris data matrix
Speciesa factor with levels
setosaversicolorvirginica: Species from corresponding rowalphaa numeric vector: the value of the optimal solution.
lambdaa numeric vector: the regularization parameter (ie point in the path).
cola factor with levels
Sepal.LengthSepal.WidthPetal.LengthPetal.Width: column from the original iris data.gammaa factor with levels
0: parameter from clustering.norma factor with levels
1parameter from clustering.solvera factor with levels
pathalgorithm used for clustering.
Source
clusterpath package
References
clusterpath article
Examples
data(iris.l1.cluster,package="directlabels")
iris.l1.cluster$y <- iris.l1.cluster$alpha
if(require(ggplot2)){
p <- ggplot(iris.l1.cluster,aes(lambda,y,group=row,colour=Species))+
geom_line(alpha=1/4)+
facet_grid(col~.)
p2 <- p+xlim(-0.0025,max(iris.l1.cluster$lambda))
print(direct.label(p2,list(first.points,get.means)))
}