slpm_init {SparseLPM}R Documentation

slpm_init

Description

Initialises the variational parameters of a SparseLPM.

Usage

slpm_init(X, K, method = "random", threshold = 0.1, stdev = NULL)

Arguments

X

Rectangular adjacency matrix with non-negative entries.

K

Number of latent dimensions of the SparseLPM.

method

The variational parameters are initialised at random. However, if method="distance", a distance-based method is used as described in Rastelli ... (2018).

threshold

A small number added to each of the entries of X to avoid numerical instability.

stdev

Standard deviation of the Gaussian used to generate the random latent positions.

Value

Returns a list of variational parameters that can be used as input for slpm_nga or slpm_elbo.

Examples

set.seed(12345)
M <- N <- 10
K <- 2
network <- slpm_gen(M = M, N = N, K = K)
var_pars_init <- slpm_init(X = network$adj, K = K)

[Package SparseLPM version 1.0 Index]