blcTree(RPMM)
blcTree()所属R语言包:RPMM
Beta RPMM Tree
测试RPMM树
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Performs beta latent class modeling using recursively-partitioned mixture model
执行测试的潜类模型使用递归分割的混合模型
用法----------Usage----------
blcTree(x, initFunctions = list(blcInitializeSplitFanny()),
weight = NULL, index = NULL, wthresh = 1e-08, nodename = "root",
maxlevel = Inf, verbose = 2, nthresh = 5, level = 0, env = NULL,
unsplit = NULL, splitCriterion = blcSplitCriterionBIC)
参数----------Arguments----------
参数:x
Data matrix (n x j) on which to perform clustering. Missing values are supported. All values should lie strictly between 0 and 1.
在其上执行数据矩阵(NXJ)聚类。支持遗漏值。 0和1之间,所有的值应该严格。
参数:initFunctions
List of functions of type “blcInitialize...” for initializing latent class model. See blcInitializeFanny for an example of arguments and return values.
列表功能型“blcInitialize ...”用于初始化潜类模型。见blcInitializeFanny的参数和返回值的一个例子。
参数:weight
Weight corresponding to the indices passed (see index). Defaults to 1 for all indices
体重指数通过相应的(见index“)。默认为1,所有指数
参数:index
Row indices of data matrix to include. Defaults to all (1 to n).
包括数据矩阵的行索引。默认值(1到n)。
参数:wthresh
Weight threshold for filtering data to children. Indices having weight less than this value will not be passed to children nodes. Default=1E-8.
重量阈值过滤数据的儿童。指数的重量小于该值将不会被传递到子节点。默认值= 1E-8。
参数:nodename
Name of object that will represent node in tree data object. Defaults to “root”. USER SHOULD NOT SET THIS.
对象名称,将代表在树节点的数据对象。默认为“根”。用户不应该设置这个。
参数:maxlevel
Maximum depth to recurse. Default=Inf.
递归的最大深度。默认值= INF。
参数:verbose
Level of verbosity. Default=2 (too much). 0 for quiet.
的详细程度。默认值= 2(太多)。 0安静。
参数:nthresh
Total weight in node required for node to be a candidate for splitting. Nodes with weight less than this value will never split. Defaults to 5.
在节点所需的节点,是一个分裂的候选人的总重量。重量小于该值的节点将永远不会分裂。默认为5。
参数:level
Current level. Defaults to 0. USER SHUOLD NOT SET THIS.
目前的水平。默认为0。 USER SHUOLD不设置此。
参数:env
Object of class “blcTree” to store tree data. Defaults to a new object. USER SHOULD NOT SET THIS.
树的数据存储对象的类“blcTree”。默认为一个新的对象。用户不应该设置这个。
参数:unsplit
Latent class parameters from parent, to store in current node. Defaults to NULL for root. This is used in plotting functions. USER SHOULD NOT SET THIS.
潜从父类参数,存储在当前节点。默认为NULL根。这是用在绘图功能。用户不应该设置这个。
参数:splitCriterion
Function of type “blcSplitCriterion...” for determining whether a node should be split. See blcSplitCriterionBIC for an example of arguments and return values.
类型“blcSplitCriterion ...”用于确定是否应分割节点的功能。见blcSplitCriterionBIC的参数和返回值的一个例子。
Details
详细信息----------Details----------
This function is called recursively by itself. Upon each recursion, certain arguments (e.g. nodename) are reset. Do not attempt to set these arguments yourself.
递归调用此函数本身。每次递归时,某些参数(如节点名称)被复位。请勿尝试自行设置这些参数。
值----------Value----------
An object of class “blcTree”. This is an environment, each of whose component objects represents a node in the tree.
对象的类“blcTree”。这是一个环境,每一个组件对象树中的一个节点。
注意----------Note----------
The class “blcTree” is currently implemented as an environment object with nodes represented flatly, with name indicating positition in hierarchy (e.g. “rLLR” = “right child of left child of left child of root”) This implementation is to make certain plotting and update functions simpler than would be required if the data were stored in a more natural “list of list” format.
类“blcTree”目前已实施的环境对象的节点断然表示,名字显示在层次结构中(例如,“rLLR”=“的左子根的左子右子”)positition实施是使某些绘图和更新功能的简单得多,如果数据被存储在一种更自然的“列表”的格式列表,将需要。
The following error may appear during the course of the algorithm:
该算法的过程中可能会出现以下错误:
(作者)----------Author(s)----------
E. Andres Houseman
参考文献----------References----------
<h3>See Also</h3>
实例----------Examples----------
## Not run: [#不运行:]
data(IlluminaMethylation)
heatmap(IllumBeta, scale="n",
col=colorRampPalette(c("yellow","black","blue"),space="Lab")(128))
# Fit Gaussian RPMM[适合高斯RPMM]
rpmm <- blcTree(IllumBeta, verbose=0)
rpmm
# Get weight matrix and show first few rows[权重矩阵,显示前几行]
rpmmWeightMatrix <- blcTreeLeafMatrix(rpmm)
rpmmWeightMatrix[1:3,]
# Get class assignments and compare with tissue[课堂作业,并比较与组织]
rpmmClass <- blcTreeLeafClasses(rpmm)
table(rpmmClass,tissue)
# Plot fit[画出适合]
par(mfrow=c(2,2))
plot(rpmm) ; title("Image of RPMM Profile")
plotTree.blcTree(rpmm) ; title("Dendrogram with Labels")
plotTree.blcTree(rpmm,
labelFunction=function(u,digits) table(as.character(tissue[u$index])))
title("Dendrogram with Tissue Counts")
# Alternate initialization[备用初始化]
rpmm2 <- blcTree(IllumBeta, verbose=0,
initFunctions=list(blcInitializeSplitEigen(),
blcInitializeSplitFanny(nu=2.5)))
rpmm2
# Alternate split criterion[替代拆分条件]
rpmm3 <- blcTree(IllumBeta, verbose=0, maxlev=3,
splitCriterion=blcSplitCriterionLevelWtdBIC)
rpmm3
rpmm4 <- blcTree(IllumBeta, verbose=0, maxlev=3,
splitCriterion=blcSplitCriterionJustRecordEverything)
rpmm4$rLL$splitInfo$llike1
rpmm4$rLL$splitInfo$llike2
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|