vblpcmstart: Generate sensible starting configuration for the variational...

View source: R/start.R

vblpcmstartR Documentation

Generate sensible starting configuration for the variational parameter set.

Description

Uses fast methods to generate sensible and coherent values for the parameters of the variational method. There are returned as a list and that list may be passed directly to vblpcmfit(). User specification of the configuration is recommended as tweaks to this list only.

Usage

vblpcmstart(g.network,G=1,d=2,LSTEPS=5e3,model="plain", CLUST=0, B=NULL,
           lcc=TRUE, edgecovs=NULL,sendcovs=NULL,receivecovs=NULL,
           socialcovs=NULL,START="FR", seed=NaN)

Arguments

g.network

a network object

G

Desired number of groups

d

Desired dimensionality of the latent space

LSTEPS

Number of steps in the log-likelihood forces algorithm

model

model specified as "plain", "rreceiver", "rsender" or "rsocial". See vblpcmcovs for details.

CLUST

degree of push to clustering at the start

B

default intercept value

lcc

logical indicator. TRUE => analyze largest connected component of g.network only FALSE => analyze the whole network.

edgecovs

optional edge covariates.

sendcovs

optional sender node covariates.

receivecovs

optional receiver node covariates.

socialcovs

optional sociality node covariates.

START

what to start the initial positions with. "FR" for Fruchterman-Reingold. "geodesic" for geodesic distances. "laplace" for using the Graph Laplacian. "random" for random.

seed

Optional seed for the random number generator in R. Equivalent to using set.seed(seed). The default NaN value does not call set.seed().

Value

A v.params list containing the latent positions, clustering membership probabilities, etc.

Author(s)

Michael Salter-Townshend

See Also

vblpcmfit, vblpcmcovs

Examples

data(sampson)
### plot the mean posterior positions with initial estimations for variational parameters
plot(vblpcmstart(samplike,G=3),main="Sampson's Monks: VB Initial Values")
### plot the mean posterior positions with final estimations for variational parameters
plot(vblpcmfit(vblpcmstart(samplike,G=3)),main="Sampson's Monks: VB Solution")

VBLPCM documentation built on March 31, 2023, 9:21 p.m.