View source: R/log_like_forces.R
log_like_forces | R Documentation |
This performs an iterative relaxation type algorithm to approximately find the positions of the nodes in the latent space that maximises the log-likelihood.
log_like_forces(net, D, X, B, m ,steps)
net |
network object on which to perform layout. |
D |
dimension of the latent space. |
X |
the initial guess for X |
B |
the intercept term. |
m |
usually N will suffice. |
steps |
maximum number of iteration steps. |
Usually only used internally in vblpcmstart()
Matrix of latent positions X
Michael Salter-Townshend
igraph::layout.fruchterman.reingold
data(sampson)
N=network.size(samplike)
X=matrix(runif(N*2,-2,2),ncol=2)
XX=vblpcmcovs(N,"plain",as.sociomatrix(samplike))
out<-log_like_forces(samplike, 2, X, 0, m=N, 1e3)
plot(samplike,coord=out$X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.