Description Usage Arguments Value Examples
Compute the loglikelihood between a GBN and data.
1 | GBNlikelihood(GBN, data)
|
GBN |
GBN - an object of type GBN. colnames and rownames of the Weightmatrix must be the same as the colnames and rownamesof elements from data. |
data |
data - Data is a format obtained by the function dataFormat. |
It returns the loglikelihood of GBN and data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Data creation
seed = 1990
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="")
GBnetwork = new("GBNetwork",WeightMatrix=W1,resMean=m1,resSigma=s1)
GBNlikelihood(GBnetwork,data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.