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

R语言 fabia包 mfsc()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 17:30:32 | 显示全部楼层 |阅读模式
mfsc(fabia)
mfsc()所属R语言包:fabia

                                        Sparse Matrix Factorization for Bicluster Analysis (MFSC)
                                         Bicluster分析稀疏矩阵分解(MFSC)

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

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

mfsc: R implementation of  mfsc.
mfsc:R的mfsc实施。


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



mfsc(X,p=5,cyc=100,sL=0.6,sZ=0.6,center=2,norm=1)





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

参数:X
the data matrix.
数据矩阵。


参数:p
number of hidden factors = number of biclusters; default = 5.
隐性因素数=的biclusters;默认值= 5。


参数:cyc
maximal number of iterations; default = 100.
最大迭代次数,默认为100。


参数:sL
final sparseness loadings; default = 0.6.
最后稀疏负荷;默认值= 0.6。


参数:sZ
final sparseness factors; default = 0.6.
最后稀疏因素;默认值= 0.6。


参数:center
data centering: 1 (mean), 2 (median), > 2 (mode), 0 (no); default = 2.
数据定心:1(平均),2(中位数),2(模式),0(无);默认为2。


参数:norm
data normalization:   1 (0.75-0.25 quantile), >1 (var=1), 0 (no); default = 1.
数据标准化:1(0.75-0.25位数),1(VAR = 1),0(无);默认值= 1。


Details

详情----------Details----------

Biclusters are found by sparse matrix factorization where both factors are sparse.
biclusters发现这两个因素是稀疏的稀疏矩阵分解。

Essentially the model is the sum of outer products of vectors:
模型本质上是向量外产品的总和:

where the number of summands  p is the number of biclusters. The matrix factorization is
加数p是的biclusters数量。矩阵分解

Here λ_i are from R^n, z_i from R^l, L from R^{n \times p}, Z from R^{p \times l}, and X from R^{n \times l}.
这里λ_iR^n,z_iR^l,LR^{n \times p},ZR^{p \times l}和XR^{n \times l}。

No noise assumption: In contrast to factor analysis there is no noise assumption.
无噪音的假设:在对比因子分析是假设无噪音。

If the nonzero components of the sparse vectors are grouped together then the outer product results in a matrix with a nonzero block and zeros elsewhere.
如果稀疏向量的非零组件被组合在一起,然后在同一个非零块矩阵和零别处外产品的结果。

The model selection is performed by a constraint optimization according to  Hoyer, 2004. The Euclidean distance (the Frobenius norm) is minimized subject to sparseness constraints.
模型的选择是根据2004年霍耶,约束优化。最小欧几里得距离(Frobenius范)受稀疏限制。

Model selection is done by gradient descent on the Euclidean objective and thereafter projection of single vectors of L and single vectors of Z to fulfill the sparseness constraints.
欧几里德目标模式的选择是通过梯度下降此后的L和单一向量的单一向量投影Z履行稀疏约束。

The projection minimize the Euclidean distance to the original vector  given an l_1-norm and an l_2-norm.
投影减少欧几里德距离给予l_1规范和l_2,规范的原始向量。

The projection is a convex quadratic problem which is solved iteratively where at each iteration at least one component is set to zero. Instead of the  l_1-norm a sparseness measurement is used which relates the l_1-norm to the l_2-norm.
投影是一个凸二次其中至少一个组件,在每一次迭代设置为零,这是解决反复的问题。而不是l_1-规范使用1稀疏测量涉及l_1,规范l_2-范。

The code is implemented in R.
河中实现代码


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


参数:
object of the class Factorization. Containing LZ (estimated noise free data L  Z), L (loadings L), Z (factors Z), U (noise X-LZ), center (centering vector), scaleData (scaling vector), X (centered and scaled data X)  
对象类Factorization。含有LZ(估计无噪音的数据L  Z)L(负荷L)Z(因素Z)U (噪音X-LZ)center(定心向量),scaleData(缩放向量),X(数据中心和规模化X)


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


Sepp Hochreiter



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

‘FABIA: Factor Analysis for Bicluster Acquisition’, Bioinformatics 26(12):1520-1527, 2010. http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btq227
‘Non-negative Matrix Factorization with Sparseness Constraints’, Journal of Machine Learning Research 5:1457-1469, 2004.

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

fabia, fabias, fabiap, fabi, fabiasp, mfsc, nmfdiv, nmfeu, nmfsc, plot, extractPlot, extractBic, plotBicluster, Factorization, projFuncPos, projFunc, estimateMode, makeFabiaData, makeFabiaDataBlocks, makeFabiaDataPos, makeFabiaDataBlocksPos, matrixImagePlot, summary, show, showSelected, fabiaDemo, fabiaVersion
fabia,fabias,fabiap,fabi,fabiasp,mfsc,nmfdiv,nmfeu,nmfsc,plot,extractPlot,extractBic,plotBicluster,Factorization,projFuncPos,projFunc,estimateMode ,makeFabiaData,makeFabiaDataBlocks,makeFabiaDataPos,makeFabiaDataBlocksPos,matrixImagePlot,summary,show,showSelected fabiaDemo,fabiaVersion


举例----------Examples----------



#---------------[---------------]
# TEST[试验]
#---------------[---------------]

dat <- makeFabiaDataBlocks(n = 100,l= 50,p = 3,f1 = 5,f2 = 5,
  of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0,
  sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0)

X <- dat[[1]]
Y <- dat[[2]]


resEx <- mfsc(X,3,30,0.6,0.6)

## Not run: [#无法运行:]

#-----------------[-----------------]
# DEMO1: Toy Data[DEMO1:玩具资料]
#-----------------[-----------------]

n = 1000
l= 100
p = 10

dat <- makeFabiaDataBlocks(n = n,l= l,p = p,f1 = 5,f2 = 5,
  of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0,
  sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0)

X <- dat[[1]]
Y <- dat[[2]]
ZC <- dat[[3]]
LC <- dat[[4]]

gclab <- rep.int(0,l)
gllab <- rep.int(0,n)
clab <- as.character(1:l)
llab <- as.character(1:n)
for (i in 1:p){
for (j in ZC[i]){
     clab[j] <- paste(as.character(i),"_",clab[j],sep="")
}
for (j in LC[i]){
     llab[j] <- paste(as.character(i),"_",llab[j],sep="")
}
gclab[unlist(ZC[i])] <- gclab[unlist(ZC[i])] + p^i
gllab[unlist(LC[i])] <- gllab[unlist(LC[i])] + p^i
}


groups <- gclab

#### MFSC[###MFSC]

resToy4 <- mfsc(X,13,100,0.6,0.6)

extractPlot(resToy4,ti="MFSC",Y=Y)

raToy4 <- extractBic(resToy4,thresZ=0.01,thresL=0.05)

if ((raToy4$bic[[1]][1]>1) &amp;&amp; (raToy4$bic[[1]][2])>1) {
    plotBicluster(raToy4,1)
}
if ((raToy4$bic[[2]][1]>1) &amp;&amp; (raToy4$bic[[2]][2])>1) {
    plotBicluster(raToy4,2)
}
if ((raToy4$bic[[3]][1]>1) &amp;&amp; (raToy4$bic[[3]][2])>1) {
    plotBicluster(raToy4,3)
}
if ((raToy4$bic[[4]][1]>1) &amp;&amp; (raToy4$bic[[4]][2])>1) {
    plotBicluster(raToy4,4)
}

colnames(resToy4@X) <- clab

rownames(resToy4@X) <- llab


plot(resToy4,dim=c(1,2),label.tol=0.1,col.group = groups,lab.size=0.6)
plot(resToy4,dim=c(1,3),label.tol=0.1,col.group = groups,lab.size=0.6)
plot(resToy4,dim=c(2,3),label.tol=0.1,col.group = groups,lab.size=0.6)


#------------------------------------------[------------------------------------------]
# DEMO2: Laura van't Veer's gene expression  [DEMO2:劳拉·范特韦埃尔的基因表达]
#        data set for breast cancer [乳腺癌数据集]
#------------------------------------------[------------------------------------------]

avail <- require(fabiaData)

if (!avail) {
    message("")
    message("")
    message("#####################################################")[################################################## ##“)]
    message("Package 'fabiaData' is not available: please install.")
    message("#####################################################")[################################################## ##“)]
} else {


data(Breast_A)

X <- as.matrix(XBreast)

resBreast4 <- mfsc(X,5,100,0.6,0.6)

extractPlot(resBreast4,ti="MFSC Breast cancer(Veer)")


raBreast4 <- extractBic(resBreast4,thresZ=0.01,thresL=0.05)

if ((raBreast4$bic[[1]][1]>1) &amp;&amp; (raBreast4$bic[[1]][2])>1) {
    plotBicluster(raBreast4,1)
}
if ((raBreast4$bic[[2]][1]>1) &amp;&amp; (raBreast4$bic[[2]][2])>1) {
    plotBicluster(raBreast4,2)
}
if ((raBreast4$bic[[3]][1]>1) &amp;&amp; (raBreast4$bic[[3]][2])>1) {
    plotBicluster(raBreast4,3)
}
if ((raBreast4$bic[[4]][1]>1) &amp;&amp; (raBreast4$bic[[4]][2])>1) {
    plotBicluster(raBreast4,4)
}

plot(resBreast4,dim=c(1,2),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(1,3),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(1,4),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(1,5),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(2,3),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(2,4),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(2,5),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(3,4),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(3,5),label.tol=0.03,col.group=CBreast,lab.size=0.6)
plot(resBreast4,dim=c(4,5),label.tol=0.03,col.group=CBreast,lab.size=0.6)

}


#-----------------------------------[-----------------------------------]
# DEMO3: Su's multiple tissue types[DEMO3:苏的多种组织类型]
#        gene expression data set [基因表达数据集]
#-----------------------------------[-----------------------------------]


avail <- require(fabiaData)

if (!avail) {
    message("")
    message("")
    message("#####################################################")[################################################## ##“)]
    message("Package 'fabiaData' is not available: please install.")
    message("#####################################################")[################################################## ##“)]
} else {

data(Multi_A)

X <- as.matrix(XMulti)

resMulti4 <- mfsc(X,5,100,0.6,0.6)

extractPlot(resMulti4,ti="MFSC Multiple tissues(Su)")


raMulti4 <- extractBic(resMulti4,thresZ=0.01,thresL=0.05)

if ((raMulti4$bic[[1]][1]>1) &amp;&amp; (raMulti4$bic[[1]][2])>1) {
    plotBicluster(raMulti4,1)
}
if ((raMulti4$bic[[2]][1]>1) &amp;&amp; (raMulti4$bic[[2]][2])>1) {
    plotBicluster(raMulti4,2)
}
if ((raMulti4$bic[[3]][1]>1) &amp;&amp; (raMulti4$bic[[3]][2])>1) {
    plotBicluster(raMulti4,3)
}
if ((raMulti4$bic[[4]][1]>1) &amp;&amp; (raMulti4$bic[[4]][2])>1) {
    plotBicluster(raMulti4,4)
}

plot(resMulti4,dim=c(1,2),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(1,3),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(1,4),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(1,5),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(2,3),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(2,4),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(2,5),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(3,4),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(3,5),label.tol=0.01,col.group=CMulti,lab.size=0.6)
plot(resMulti4,dim=c(4,5),label.tol=0.01,col.group=CMulti,lab.size=0.6)

}



#-----------------------------------------[-----------------------------------------]
# DEMO4: Rosenwald's diffuse large-B-cell[DEMO4:罗森沃尔德的弥漫性大B单元]
#        lymphoma gene expression data set [淋巴瘤基因表达数据集]
#-----------------------------------------[-----------------------------------------]

avail <- require(fabiaData)

if (!avail) {
    message("")
    message("")
    message("#####################################################")[################################################## ##“)]
    message("Package 'fabiaData' is not available: please install.")
    message("#####################################################")[################################################## ##“)]
} else {


data(DLBCL_B)

X <- as.matrix(XDLBCL)


resDLBCL4 <- mfsc(X,5,100,0.6,0.6)

extractPlot(resDLBCL4,ti="MFSC Lymphoma(Rosenwald)")

raDLBCL4 <- extractBic(resDLBCL4,thresZ=0.01,thresL=0.05)

if ((raDLBCL4$bic[[1]][1]>1) &amp;&amp; (raDLBCL4$bic[[1]][2])>1) {
    plotBicluster(raDLBCL4,1)
}
if ((raDLBCL4$bic[[2]][1]>1) &amp;&amp; (raDLBCL4$bic[[2]][2])>1) {
    plotBicluster(raDLBCL4,2)
}
if ((raDLBCL4$bic[[3]][1]>1) &amp;&amp; (raDLBCL4$bic[[3]][2])>1) {
    plotBicluster(raDLBCL4,3)
}
if ((raDLBCL4$bic[[4]][1]>1) &amp;&amp; (raDLBCL4$bic[[4]][2])>1) {
    plotBicluster(raDLBCL4,4)
}

plot(resDLBCL4,dim=c(1,2),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(1,3),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(1,4),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(1,5),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(2,3),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(2,4),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(2,5),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(3,4),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(3,5),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)
plot(resDLBCL4,dim=c(4,5),label.tol=0.03,col.group=CDLBCL,lab.size=0.6)

}




## End(Not run)[#结束(不运行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-9 09:49 , Processed in 0.023646 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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