FitBeta | R Documentation |
Update the beta weights according to the gradient ascent
FitBeta(
beta.init,
psi,
maxIter = 50,
eps = 1e-06,
unlinked = NULL,
sum.weights
)
beta.init |
Initial beta weight matrix |
psi |
Psi matrix, filled with ratios of bivariate probabilities over marginals, which can in the Gaussian case be deduced from the correlation matrix. |
maxIter |
Maximum number of iterations |
eps |
Precision parameter controlling the convergence of weights beta |
unlinked |
An optional vector of nodes which are not linked with each other |
sum.weights |
Sum constraint for the weight matrix |
edges_prob: p x p matrix of edges probabilities
edges_weight: p x p matrix of edges weights for any spanning tree
logpY: vector of log-likelihoods
maxIter: final number of iterations EMtree has ran
timeEM: EMtree computation time
set.seed(1)
n=50
p=10
Y=data_from_scratch("tree",p=p,n=n)$data
mean.val=exp((-(p-2)*log(p))/(p-1))
beta = matrix(mean.val, p, p); diag(beta)=0
psi=Psi_alpha(cor(Y), n)$psi
FitEM = FitBeta(beta.init=beta, psi=psi, maxIter = 6, sum.weights=sum(beta))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.