plot.partition(cluster)
plot.partition()所属R语言包:cluster
Plot of a Partition of the Data Set
积数据集的分区
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates plots for visualizing a partition object.
创建partition对象可视化的图谋。
用法----------Usage----------
## S3 method for class 'partition'
plot(x, ask = FALSE, which.plots = NULL,
nmax.lab = 40, max.strlen = 5, data = x$data, dist = NULL,
cor = TRUE, stand = FALSE, lines = 2,
shade = FALSE, color = FALSE, labels = 0, plotchar = TRUE,
span = TRUE, xlim = NULL, ylim = NULL, main = NULL, ...)
参数----------Arguments----------
参数:x
an object of class "partition", typically created by the functions pam, clara, or fanny.
类"partition"的对象,通常由职能创造pam,clara或fanny。
参数:ask
logical; if true and which.plots is NULL, plot.partition operates in interactive mode, via menu.
逻辑,如果真正和which.plots是NULL,plot.partition在交互模式下运行,通过menu。
参数:which.plots
integer vector or NULL (default), the latter producing both plots. Otherwise, which.plots must contain integers of 1 for a clusplot or 2 for silhouette.
整数向量或NULL(默认),后者生产两个图。否则,which.plots必须包含整数1clusplot一个或2的剪影。
参数:nmax.lab
integer indicating the number of labels which is considered too large for single-name labeling the silhouette plot.
整数,指示标签,这被认为是单一名称标记的剪影图太大的数目。
参数:max.strlen
positive integer giving the length to which strings are truncated in silhouette plot labeling.
正整数剪影图标签截断字符串的长度。
参数:data
numeric matrix with the scaled data; per default taken from the partition object x, but can be specified explicitly.
数字矩阵与规模数据;每默认分区对象x,但可以明确指定。
参数:dist
when x does not have a diss component as for pam(*, keep.diss=FALSE), dist must be the dissimilarity if a clusplot is desired.
当x不有diss的pam(*, keep.diss=FALSE)组件,dist必须是不同,如果clusplot需要。
参数:cor,stand,lines,shade,color,labels,plotchar,span,xlim,ylim,main, ...
All optional arguments available for the clusplot.default function (except for the diss one) and graphical parameters (see par) may also be supplied as arguments to this function.
所有可选参数clusplot.default函数(diss独除外)和图形参数(见par)也可提供作为这个函数的参数。
Details
详情----------Details----------
When ask= TRUE, rather than producing each plot sequentially, plot.partition displays a menu listing all the plots that can be produced. If the menu is not desired but a pause between plots is still wanted, call par(ask= TRUE) before invoking the plot command.
当ask= TRUE,而不是按顺序产生每个小区,plot.partition显示一个菜单,列出了所有可以生产的图。如果菜单不理想,但仍然希望图之间的暂停,叫par(ask= TRUE)之前调用plot命令。
The clusplot of a cluster partition consists of a two-dimensional representation of the observations, in which the clusters are indicated by ellipses (see clusplot.partition for more details).
clusplot集群分区组成的二维表示的意见,在该集群由椭圆表示(见clusplot.partition更多详情)。
The silhouette plot of a nonhierarchical clustering is fully described in Rousseeuw (1987) and in chapter 2 of Kaufman and Rousseeuw (1990). For each observation i, a bar is drawn, representing its silhouette width s(i), see silhouette for details. Observations are grouped per cluster, starting with cluster 1 at the top. Observations with a large s(i) (almost 1) are very well clustered, a small s(i) (around 0) means that the observation lies between two clusters, and observations with a negative s(i) are probably placed in the wrong cluster.
非层次聚类的剪影图充分说明在Rousseeuw(1987)在章考夫曼和Rousseeuw的(1990)2。对于每一个我观察,条形绘制,代表其轮廓宽度S(I),看到silhouette详情。观测进行分组,每个集群开始前1集群。与大S(I)(接近1)的意见是很好的聚集,小S(I)(约0)表示观察两个群集之间,意见与负S(I),可能是放置在错误的群集。
A clustering can be performed for several values of k (the number of clusters). Finally, choose the value of k with the largest overall average silhouette width.
一个群集可以执行k(集群)的几个值。最后,选择k最大的整体平均轮廓宽度值。
副作用----------Side Effects----------
An appropriate plot is produced on the current graphics device. This can be one or both of the following choices: <br> Clusplot <br> Silhouette plot
当前图形设备上产生一个适当的图。这可能是一个或两个以下的选择:参考Clusplot参考剪影图
注意----------Note----------
In the silhouette plot, observation labels are only printed when the number of observations is less than nmax.lab (40, by default), for readability. Moreover, observation labels are truncated to maximally max.strlen (5) characters. <br> For more flexibility, use plot(silhouette(x), ...), see plot.silhouette.
在剪影图,观察标签只印时的若干意见是比nmax.lab(默认为40),以提高可读性。此外,观察标签被截断,以最大限度max.strlen(5)字符。参考有关更多的灵活性,可使用plot(silhouette(x), ...),看到plot.silhouette。
参考文献----------References----------
Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math., 20, 53–65.
参见----------See Also----------
partition.object, clusplot.partition, clusplot.default, pam, pam.object, clara, clara.object, fanny, fanny.object, par.
partition.object,clusplot.partition,clusplot.default,pam,pam.object,clara,clara.object,fanny,fanny.object,par。
举例----------Examples----------
## generate 25 objects, divided into 2 clusters.[#产生25个对象,分为2簇。]
x <- rbind(cbind(rnorm(10,0,0.5), rnorm(10,0,0.5)),
cbind(rnorm(15,5,0.5), rnorm(15,5,0.5)))
plot(pam(x, 2))
## Save space not keeping data in clus.object, and still clusplot() it:[#节省空间不保持在clus.object数据,并仍然clusplot():]
data(xclara)
cx <- clara(xclara, 3, keep.data = FALSE)
cx$data # is NULL[是NULL]
plot(cx, data = xclara)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|