Description Usage Arguments Details Value References Examples
Standard Algorithm for Bayesian Network Discovery
1 2 3 |
pvalue |
a vector of p-values obtained from large scale statistical hypothesis testing |
net |
a n by n network configuration, n is the length of pvalue |
iter |
number of iterations. The default is 5000 |
nburns |
number of burn-in. The default is 2000 |
piall |
a vector of selections of pi0. The default vector is 0.75, 0.8, 0.85, 0.9. The selections of pi0 should be placed in sequence, from smaller to larger. |
rhoall |
a vector of selections of rho0 and rho1. The default vector is 0.5, 1, 5, 10, 15. The selections of rho0 and rho1 should be placed in sequence, from smaller to larger. |
status |
default=FALSE |
fit |
NULL |
show.steps |
number default=1 |
showlikelihood |
logical default=FALSE |
likelihood.frequency |
number default=100 |
This generic function fits a Bayesian Nonparametric Mixture Model for gene selection incorporating network information (Zhao et al., 2014):
r_i| g_i, theta ~ N(mu_g_i, sigma_g_i),
g_i | z_i=k, q_k ~ Discrete(a_k, q_k),
theta ~ G_0k, for g in a_k,
q_k ~ Dirichlet(tau_k 1_L_k/L_k),
theta=theta_g_g in a_0 and a_1
theta_g=(mu_g, sigma_g)
where we define
a_0=(-L_0+1,-L_0+2,...,0) , a_1=(1,2,...,L_1) and the correspondent probability q_0=(q_-L_0+1, q_-L_0+2, ...,q_0), q_1=(q_1, q_2, ..., q_L_1), according to the defination of Discrete(a_k, b_k), for example, Pr(g_i=L_0+2)=q_-L_0+2.
We have an assumption that "selected" gene or image pixel should have larger statiscs comparing to "unselected" ones without the loss of generality. In this regard, we set the restriction mu_g<mu_g+1 for g=-L_0+1, -L_0+2,...,L_1.
For this function, The NET-DPM-1, considered as standard function is applied , and more details about the algorithm can be referred from Appnendix B.1 of Zhao et al., 2014
The trace of gi showing the evolution of the Monte Carlo Markov Chain
Zhao, Y.*, Kang, J., Yu, T. A Bayesian nonparametric mixture model for gene and gene-sub network selection Annals of Applied Statistics, In press: 2014.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #' ##Creating the network of 10X10 image
## Not run:
library(igraph)
library(BayesNetDiscovery)
g <- graph.lattice(length=10,dim=2)
## the input of argument \code{net}
net=as(get.adjacency(g,attr=NULL),"matrix")
##Assign the signal elements with signal intenstion as normal distribution N(1,0.2).
While noise is set as N(0,0.2)
newz=rep(0,100)
for (i in 3:7)
{
newz[(i*10+3):(i*10+7)]=1
}
testcov<-0
for(i in 1:100){
if(newz[i]==0){
testcov[i]<-rnorm(1,mean=0,sd=0.2)
}else{
testcov[i]<-rnorm(1,mean=1,sd=0.2)
}
}
##The profile of the impage
image(matrix(testcov,10,10),col=gray(seq(0,1,length=255)))
##Transform the signals into pvalue form and begin identification
pvalue=pnorm(-testcov)
total=Networks.STD(pvalue,net,iter=5000,piall=c(0.8, 0.85, 0.9, 0.95),
rhoall=c(0.5,1,5,10,15))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.