找回密码
 注册
查看: 1122|回复: 0

R语言 sparcl包 KMeansSparseCluster.permute()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:25:27 | 显示全部楼层 |阅读模式
KMeansSparseCluster.permute(sparcl)
KMeansSparseCluster.permute()所属R语言包:sparcl

                                        Choose tuning parameter for sparse k-means clustering
                                         选择调整参数稀疏的k-means聚类

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The tuning parameter controls the L1 bound on w, the feature weights. A permutation approach is used to select the tuning parameter.
调整参数控制L1 W,要素权重的约束。置换的方法来选择调谐参数。


用法----------Usage----------


KMeansSparseCluster.permute(x, K=NULL, nperms = 25, wbounds = NULL,
silent = FALSE, nvals = 10, centers=NULL)



参数----------Arguments----------

参数:x
The nxp data matrix, n is the number of observations and p the number of features.
恩智浦的数据矩阵,n为观测和p的功能。


参数:K
The number of clusters desired - that is, the "K" in K-means clustering. Must specify K or centers.
所需的簇的数目 - 也就是说,K-means聚类中的“K”。必须指定K或中心。


参数:nperms
Number of permutations.
的排列数目。


参数:wbounds
The range of tuning parameters to consider. This is the L1 bound on w, the feature weights. If NULL, then a range of values will be chosen automatically. Should be greater than 1 if non-null.
整定参数的范围来考虑。这是L1瓦特,特征权重的约束。如果为NULL的值的范围,然后将被自动选择。应该是大于1,如果非空。


参数:silent
Print out progress?
打印出的进展如何?


参数:nvals
If wbounds is NULL, then the number of candidate tuning parameter values to consider.
如果wbounds是NULL,然后数的候选调整参数值需要考虑。


参数:centers
Optional argument. If you want to run the k-means algorithm starting from a particular set of clusters, then you can enter the Kxp matrix of cluster centers here. Default use case involves taking centers=NULL and instead specifying K.  
可选参数。如果你想运行的k-means算法从一组特定的聚类,然后你就可以进入KXP矩阵的聚类中心。默认情况下使用的情况下,涉及到中心= NULL,而不是指定K.


Details

详细信息----------Details----------

Sparse k-means clustering seeks a p-vector of weights w (one per feature) and a set of clusters  C1,...,CK that optimize $maximize_C1,...,CK,w sum_j w_j BCSS_j$ subject to $||w||_2 <= 1, ||w||_1 <= s, w_j >= 0$, where $BCSS_j$ is the between cluster sum of squares for feature j, and s is a value for the L1 bound on w. Let O(s) denote the objective function with tuning parameter s: i.e. $O(s)=sum_j w_j BCSS_j$.
稀疏的k-means聚类寻求一个P-向量的权重w(每一个功能)和一组聚类C1,...,CK,优化maximize_C1美元,...,CK,W sum_j w_j BCSS_j $ $ | |瓦特| | _2 <= 1,| |瓦特| | _1 <= s时,w_j> = 0 $,其中$ BCSS_j $是聚类特征j,和s的平方总和之间的是一个值,该值L1 W上的约束。 O(S)为目标函数:即调整参数s $ O(S)= sum_j w_j BCSS_j $。

We permute the data as follows: within each feature, we permute the observations. Using the permuted data, we can run sparse K-means with tuning parameter s, yielding the objective function O*(s). If we do this repeatedly we can get a number of O*(s) values.
我们置换的数据如下:在每一个功能,我们置换的意见。使用排列的数据,我们可以运行稀疏的K-means调整参数s,得到目标函数O *(S)。如果我们这样做反复,我们可以得到一些O *(S)值。

Then, the Gap statistic is given by $Gap(s)=log(O(s))-mean(log(O*(s)))$. The optimal s is that which results in the highest Gap statistic. Or, we can choose the smallest s such that its Gap statistic is within $sd(log(O*(s)))$ of the largest Gap statistic.
然后,差距统计数字是$峡(S)= LOG(O(S))的意思(登录(O *()))$。最优s是,这会导致最高的间隙统计。或者,我们可以选择最小的S等,其间隙统计范围内的SD(log(O *()))的最大间隙统计。


值----------Value----------


参数:gaps
The gap statistics obtained (one for each of the tuning parameters tried). If O(s) is the objective function evaluated at the tuning parameter s, and O*(s) is the same quantity but for the permuted data, then Gap(s)=log(O(s))-mean(log(O*(s))).
获得的间隙统计(每个调谐参数之一试过)。如果O(S)的目标函数在调整参数s进行评估,O *(s)是相同的数量,但置换后的数据,然后间隙(S)=log(O(S)),平均值(log( O *()))。


参数:sdgaps
The standard deviation of log(O*(s)), for each value of the tuning parameter s.
log(O *())的标准偏差,为每个调谐参数s的值。


参数:nnonzerows
The number of features with non-zero weights, for each value of the tuning parameter.
的数量与非零的权重的功能,每个值的调谐参数。


参数:wbounds
The tuning parameters considered.
调整参数。


参数:bestw
The value of the tuning parameter corresponding to the highest gap statistic.
调谐参数的值对应于最高的间隙统计。


(作者)----------Author(s)----------


Daniela M. Witten and Robert Tibshirani



参考文献----------References----------



参见----------See Also----------

KMeansSparseCluster, HierarchicalSparseCluster, HierarchicalSparseCluster.permute
KMeansSparseCluster,HierarchicalSparseCluster,HierarchicalSparseCluster.permute


实例----------Examples----------


# generate data[生成数据]
set.seed(11)
x <- matrix(rnorm(50*300),ncol=300)
x[1:25,1:50] <- x[1:25,1:50]+1
x <- scale(x, TRUE, TRUE)
# choose tuning parameter[选择调整参数]
km.perm <-
KMeansSparseCluster.permute(x,K=2,wbounds=seq(3,9,len=15),nperms=5)
print(km.perm)
plot(km.perm)
# run sparse k-means[运行稀疏的k-means]
km.out <- KMeansSparseCluster(x,K=2,wbounds=km.perm$bestw)
print(km.out)
plot(km.out)
# run sparse k-means for a range of tuning parameter values[运行装置,用于整定参数值的范围内的稀疏的k-]
km.out <- KMeansSparseCluster(x,K=2,wbounds=2:7)
print(km.out)
plot(km.out)
# Repeat, but this time start with a particular choice of cluster[重复,但此时间开始与一个特定的选择的聚类]
# centers.[中心。]
# This will do 4-means clustering starting with this particular choice[这将4-means聚类开始与这个特殊的选择]
# of cluster centers.[聚类中心。]
km.perm.out <- KMeansSparseCluster.permute(x,wbounds=2:7, centers=x[1:4,])
print(km.out)
plot(km.out)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-10 03:29 , Processed in 0.028547 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表