BootstrapBN             package:BNArray             R Documentation

_B_o_o_t_s_t_r_a_p _B_a_y_e_s_i_a_n _n_e_t_w_o_r_k_s

_D_e_s_c_r_i_p_t_i_o_n:

     Create a set of Bayesian networks by Efron's non-parametric
     bootstrap  evaluate network features.

_U_s_a_g_e:

     BootstrapBN(sam.tran, nboot, ...)

_A_r_g_u_m_e_n_t_s:

sam.tran: an object of 'data.frame' type with rows containing
          expression data in one microarray experiment and columns
          expression data of one gene across multiple experiments. The
          column names of 'sam.tran' correspond to gene names/ORF 

   nboot: folds to bootstrap 

     ...: passing parameters for later version usage 

_D_e_t_a_i_l_s:

     Microarray data are perturbed using non-parametric bootstrap with
     replacement to generate more data to construct several candidate
     Bayesian networks. This collection of Bayesian networks are
     further used for feature evaluation.

_V_a_l_u_e:

     A list with the following elements, 

g.matrix.list.ret : A list each of which element is a adjacent matrix
          for each bootstraped Bayesian network

tran.search.ret : an object of 'autosearchEx' result

tran.search.ret : a list of highest score networks candidate from
          'heuristicEx'

     ...

_A_u_t_h_o_r(_s):

     Xiaohui Chen cxh1984@interchange.ubc.ca, 
      Kaida Ning aprilnkd@hotmail.com, 
      Ming Chen mchen@zju.edu.cn.

_R_e_f_e_r_e_n_c_e_s:

     Further information about *BNArray* can be found at:
      <URL: http://www.cls.zju.edu.cn/binfo/BNArray>.

_E_x_a_m_p_l_e_s:

     ## Not run: 
             library(BNArray)
             data(total.data)
             setwd("/home")  #for linux user

     ##SHOULD call LLSimpute first
     ori.compact<-LLSimpute(total.data$df.all,total.data$df.ori,total.data$n.changed)

     ##Imputing the too bad missing values
     ori.compact<-FinalImpute(ori.compact)

     ##Prepare readily used complete database for constructing Bayesian network
     bn.data<-PrepareCompData(ori.compact)
     n.microarray<-dim(ori.compact)[2]

     ##Do Bayesian network construction
     ##select a subset genes to be modeled
     selected.gene<-c(10:15)
     bn.data<-bn.data[1:(n.microarray-1),selected.gene]
     nw<-network(bn.data)

     ##specify a prior network
     nw.prior<-jointprior(nw,20)
     nw<-getnetwork(learn(nw,bn.data,nw.prior))

     ##perform greedy search
     nw.search<-autosearchEx(nw,bn.data,nw.prior,removecycles=TRUE)

     ##perturb initial network nw with random restarts to avoid local maximum
     nw.heu<-heuristicEx(getnetwork(nw.search),bn.data,nw.prior,removecycles=TRUE,restart=2,degree=10,trylist=gettrylist(nw.search))

     ##highest score network
     nw.best<-getnetwork(nw.heu)
     plot(nw.best,cexscale=3,unitscale=5)

     ##Construct graph data matrix from network objects
     g.matrix<-ConstGraphMatrix(total.data$n.changed,nw.heu,bn.data)
     WriteBN(g.matrix)

     ##Do Bootstraps
     nboot<-3
     boot.ret<-BootstrapBN(bn.data,nboot)
     WriteBootBN(boot.ret)
     ## End(Not run)

