RtreemixModel-class(Rtreemix)
RtreemixModel-class()所属R语言包:Rtreemix
Class "RtreemixModel"
类“RtreemixModel”
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This class contains all the data needed for characterizing the mutagenetic trees mixture model (mixture parameters, mixture components, ...). The tree components of the model are given as a list of directed graphNEL objects.
这个类包含了所有的特性,致突变的树木混合模型(混合参数,混合组件,...)所需的数据。模型的树组件定向graphNEL对象名单。
类的对象----------Objects from the Class----------
Objects can be created by calls of the form new("RtreemixModel", ParentData, Weights, WeightsCI, Resp, CompleteMat, Star, Trees). The RtreemixModel class extends the RtreemixData class and specifies the mutagenetic trees mixture model. If the model is not randomly generated the parent class gives the RtreemixData used for learning the mixture model. The directed trees that build up the model are represented as a list of directed graphNEL objects, and their weights (the mixture parameters) are given as a numeric vector. This class can also contain other useful information connected with the mixture model like confidence intervals for the mixture parameters and the edge weights (resulting from a bootstrap analysis), an indicator for the presence of the star component, etc. They are all listed in the text below with brief descriptions.
创建对象可以通过检测的形式new("RtreemixModel", ParentData, Weights, WeightsCI, Resp, CompleteMat, Star, Trees)。 类RtreemixModel延伸RtreemixData类,并指定致突变树木的混合模型。如果模型没有随机生成的父类给RtreemixData用于学习的混合模型。定向树木,建立模型的代表作为定向graphNEL对象名单,并给出一个数值向量的权重(混合参数)。这个类还可以包含其他有用的信息与连接之类的混合模型的置信区间为混合参数和边权(从引导分析),为明星组件存在的指标,等他们都列在下面的文字简要说明。
The ParentData is an RtreemixData object that specifies the data used for estimating the mutagenetic trees mixture model. It is not specified for random mixture models, since they are not estimated from a given dataset but generated randomly.
ParentData是RtreemixData对象,指定使用的数据估算,致突变的树木混合模型。它没有被指定为随机混合模型,因为他们没有估计从一个给定的数据集,但随机生成。
The Weights is a numeric vector that contains the mixture parameters of the model. Its length equals the length of the list of tree components Trees.
Weights是一个数字vector包含混合模型的参数。它的长度等于长度的树组件listTrees。
The WeightsCI is a named list with length equal to the length of the Weights. Each list element is a numeric vector of length two specifying the lower and upper bound of the confidence interval for the corresponding mixture parametar. The confidence intervals are derived using the bootstrap method.
WeightsCI是一个名为listWeights长度的长度相等。每个列表元素是一个数字vector长度为二的指定为相应混合物parametar信心区间的上下限。使用的引导方法得到的置信区间。
The Resp is a numeric matrix that specifies the responsibility of each tree component to generate each of the patterns in the ParentData. The number of rows in Resp is equal to the number of trees in the mixture (the length of the list Trees) and the number of columns equals the number of patients in ParentData. For random mixture models it is an empty matrix, since they are not estimated from a given dataset.
Resp数字matrix指定每个树组件来产生每个ParentData模式的责任。行Resp混合物中树木的数量(列表的长度等于Trees)和列数等于患者ParentData的数量。随机混合模型,它是一个空矩阵,因为它们不是从一个给定的数据集估计。
The CompleteMat is a binary matrix that specifies the complete data in case some measurements for some patients are missing in the data used for learning the model (the ParentData). It has the same size as the matrix specifying the data in ParentData. The missing data are estimated in the EM-algorithm used for fitting the mixture model. When there are no missing data in ParentData, or the model is randomly generated the CompleteMat is an empty matrix.
CompleteMatmatrix,指定完整的情况下,一些患者的测量是在学习模型(ParentData)所使用的数据丢失的数据是一个二进制。它具有同样大小的矩阵指定的数据ParentData。丢失的数据,估计在装修混合模型的EM算法。当有ParentData,或模型是随机生成的CompleteMat没有丢失数据是一个空矩阵。
The Star is an indicator of the presence of a noise (star) component and is mostly relevant for models with a single tree component, since it is assumed that mixture models with at least two components always have the noise as a first component. It is of type logical.
Star是存在噪音(五星级)组件的一个指标,主要是用一个单一的树组件模型有关,因为它被认为至少有两个组件的混合模型总是有噪音作为第一组件。它是类型logical。
The Trees is a list of directed graphNEL objects, each for every tree component in the mixture model. The genetic events are represented as nodes in the graphs. The edgeData of each tree can have two attributes: "weight" and "ci". Please see the help page on graph-class and graphNEL-class in the package graph. The "weight" attribute is for edge weight, i.e. the conditional probability that the child event of the edge occured given that the parent event already occured. The "ci" attribute is for the bootstrap confidence intervals for the edge weight (a numeric vector with length two).
Trees是的定向list对象,每个混合模型中的每一个树组件graphNEL。图中的节点代表的遗传事件。 edgeData每棵树可以有两个属性:"weight"和"ci"。 graph-class和graphNEL-class包graph请参阅帮助页面。 "weight"属性为边的权重,即父事件已经发生,边缘儿童事件发生的条件概率。 "ci"属性是为bootstrap信赖区间为边的权重(长度为二的数字向量)。
插槽----------Slots----------
Weights: Object of class "numeric". The length
Weights类"numeric"的对象。长度
WeightsCI: Object of class "list". The length
WeightsCI类"list"的对象。长度
Resp: Object of class "matrix". The number of rows of Resp must be identical to the length of Trees, and its number of columns to the number of patients
Resp类"matrix"的对象。 Resp行的数量必须是相同的长度Trees,其列数的患者人数
CompleteMat: Object of class "matrix". When specified (when there are missing data) the size of the CompleteMat must be equal to the size of the matrix used to
CompleteMat类"matrix"的对象。当指定的(当有丢失数据)CompleteMat的的大小必须等于使用矩阵大小
Star: Object of class "logical".
Star类"logical"的对象。
Trees: Object of class "list". The length of
Trees类"list"的对象。的长度
延伸----------Extends----------
Class "RtreemixData", directly.
类"RtreemixData",直接。
方法----------Methods----------
CompleteMat signature(object = "RtreemixModel"): A method used for obtaining the complete dataset, in case there were any missing measurements for some patients in the dataset used to
CompleteMatsignature(object = "RtreemixModel"):为获得完整的数据集的一种方法,如果有任何缺少的测量用于为DataSet中的一些患者
Resp signature(object = "RtreemixModel"): A method for obtaining the matrix of responsibilities for the trees to generate
RESPsignature(object = "RtreemixModel"):获得树木的责任矩阵生成方法
Star signature(object = "RtreemixModel"): A method for checking the presence of a noise component in the mixture model
星signature(object = "RtreemixModel"):检查存在的噪声成分的混合模型的方法
Trees signature(object = "RtreemixModel"): A method for obtaining the tree components of the mixture model as a list
树木signature(object = "RtreemixModel"):获得混合模型树组件列表的方法
Weights signature(object = "RtreemixModel"): A method for obtaining the mixture parameters (the weights of the trees in
重量signature(object = "RtreemixModel"):一种方法获得的混合参数(树木的重量
Weights<- signature(object = "RtreemixModel"): A method for replacing the value of the slot Weights with a specified numeric vector. The components of this vector
重量< - signature(object = "RtreemixModel"):更换插槽价值的方法Weights指定numeric向量的。此向量的组件
WeightsCI signature(object = "RtreemixModel"): A method
WeightsCIsignature(object = "RtreemixModel"):一个方法
getData signature(object = "RtreemixModel"): A method for obtaining the ParentData of the mixture model, i.e. the
getData方法signature(object = "RtreemixModel"):ParentData混合模型获得的方法,即
getTree signature(object = "RtreemixModel", k = "numeric"): A method for obtaining the k-th tree component of the
getTreesignature(object = "RtreemixModel", k = "numeric"):一个方法获得的第k个树组件
numTrees signature(object = "RtreemixModel"): A method
numTreessignature(object = "RtreemixModel"):一个方法
作者(S)----------Author(s)----------
Jasmina Bogojeska
参考文献----------References----------
参见----------See Also----------
RtreemixGPS-class, RtreemixStats-class, RtreemixData-class, RtreemixSim-class, fit-methods, bootstrap-methods, generate-methods, comp.models, comp.trees
RtreemixGPS-class,RtreemixStats-class,RtreemixData-class,RtreemixSim-class,fit-methods,bootstrap-methods,generate-methods,comp.models,comp.trees
举例----------Examples----------
## Generate a random RtreemixModel object with 2 components.[#生成一个2组件的随机RtreemixModel对象。]
rand.mod <- generate(K = 2, no.events = 9, noise.tree = TRUE, prob = c(0.2, 0.8))
show(rand.mod)
plot(rand.mod) ## plot the tree components of the model[#绘制模型的树组件]
plot(rand.mod, k = 2) ## plot the second component of the model[#绘制模型的第二部分。]
## Draw data from a specified mixture model.[#从指定的混合模型绘制数据。]
draws <- sim(model = rand.mod, no.draws = 200)
show(draws)
## Create an RtreemixModel object by fitting model to the drawn data.[#创建的数据拟合模型RtreemixModel对象的。]
mod <- fit(data = draws, K = 2, equal.edgeweights = TRUE, noise = TRUE)
show(mod)
## See the values of the slots of the RtreemixModel object.[#查看的插槽的RtreemixModel对象的值。]
Weights(mod)
Resp(mod)
CompleteMat(mod)
Star(mod)
Trees(mod)
## See data used for learning the model.[#学习模型使用的数据。]
getData(mod)
## See the number of tree components in the mixture model.[#见树组件中的混合模型。]
numTrees(mod)
## See a specific tree component k.[#见一个特定的树组件ķ。]
getTree(object = mod, k = 2)
## See the conditional probabilities assigned to edges of the second tree component.[#分配给第二个树组件的边缘条件概率。]
edgeData(getTree(object = mod, k = 2), attr = "weight")
## See the probability distribution encoded by the model on the set of all possible patterns.[#见的概率分布模型上所有可能的模式集编码。]
distr <- distribution(model = mod)
distr
## Get the probabilities.[#获取的概率。]
distr$probability
## See the probability distribution encoded by the model on the set of all possible patterns[#见编码上所有可能的模式集的概率分布模型。]
## calculated for given sampling mode, and input and output parameters.[#计算给定的采样模式,输入和输出参数。]
distr1 <- distribution(model = mod, sampling.mode = "exponential", sampling.param = 1, output.param = 1)
distr1
## Create a RtreemixModel and analyze its variance with the bootstrap method.[#创建一个RtreemixModel与引导方法,并分析其方差。]
mod.boot <- bootstrap(data = draws, K = 2, equal.edgeweights = TRUE, B = 100)
## See the confidence intervals for the mixture parameters (the weights).[#混合参数(重量)的置信区间。]
WeightsCI(mod.boot)
## See the confidence intervals of the conditional probabilities assigned to the edges.[#分配给边缘的条件概率的置信区间。]
edgeData(getTree(mod.boot, 2), attr = "ci")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|