Description Usage Arguments Value Examples
This function is used by the MCMC.GBN algorithm every step : it propose a new order, order nodes of the GBN according to the new order, computes the maximum likelihood estimator based on the data.
1 |
GBN |
GBN - An object of class GBN. If this is a step of the MCMC.GBN function, this argument is the maximum likelihood estimation of the previous iteration. |
data |
data - can be obtained by the function dataFormat. |
alpha |
double - First Mallows temperature. |
alpha2 |
double - Second Mallows temperature. If listblocks is empty, this argument won't be used. |
lambda |
logarithmic - Coefficient of the penalty Ridge. |
listblocks |
list - A list of nodes of the form (c("N1","N2"),c("N3","N4","N5")) where "N1","N2","N3","N4" and "N5" are elements of rownames and colnames of firstGBN elements and data elements. |
str |
matrix - To improve the efficiency of the algorithm, a structure can be add. Colnames and rownames are not needed. |
GBN |
The maximum likelihood estimation of the first GBN calculated according to the data and the new node order. |
data |
The data are ordered according to the new node order proposed by the rmallows or rmallowsBlocks function using dataOrder. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Data creation
seed = 1990
n = 3000
p <- 10
m<-rep(0,10)
sigma<-rep(0.1,10)
W <- 1*upper.tri(matrix(0,p,p))
data <- dataCreate(nbData = 2*p, p = 10,KO = list(1,9), nbKO = c(p,p), W = W , m = m,sigma = sigma, seed = seed)$data
# Initial Value
W1=1*upper.tri(matrix(0,p,p))
m1=rep(0,p)
s1=rep(10e-4,p)
colnames(W1)=names(m1)=names(s1)=rownames(W1)=paste("N",1:p,sep="")
firstGBN = new("GBNetwork",WeightMatrix=W1,resMean=m1,resSigma=s1)
newMallowsProposal(firstGBN, data, alpha = 0.5, alpha2 = 0.01, lambda=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.