gaussian_snapshot_bs {fase}R Documentation

Simulate Gaussian edge networks with B-spline latent processes

Description

gaussian_snapshot_bs simulates a realization of a functional network with Gaussian edges, according to an inner product latent process model. The latent processes are generated from a B-spline basis with equally spaced knots.

Usage

gaussian_snapshot_bs(n,d,m,self_loops=TRUE,
                     spline_design,sigma_edge=1,
                     process_options)

Arguments

n

A positive integer, the number of nodes.

d

A positive integer, the number of latent space dimensions.

m

A positive integer, the number of snapshots. If this argument is not specified, it is determined from the snapshot index vector spline_design$x_vec.

self_loops

A Boolean, if FALSE, all diagonal adjacency matrix entries are set to zero. Defaults to TRUE.

spline_design

A list, describing the B-spline design:

q

A positive integer, the dimension of the B-spline basis. Must be at least 4 and at most m.

x_vec

A vector, the snapshot evaluation indices for the data. Defaults to an equally spaced sequence of length m from 0 to 1.

x_max

A scalar, the maximum of the index space. Defaults to max(spline_design$x_vec).

x_min

A scalar, the minimum of the index space. Defaults to min(spline_design$x_vec).

sigma_edge

A positive scalar, the entry-wise standard deviation for the Gaussian edge variables. Defaults to 1.

process_options

A list, containing additional optional arguments:

sigma_coord

A positive scalar, or a vector of length d. If it is a vector, the entries correspond to the standard deviation of the randomly generated basis coordinates for each latent dimension. If is is a scalar, it corresponds to the standard deviation of the basis coordinates in all dimensions. Defaults to 1.

Details

The spline design of the functional network data (snapshot indices, basis dimension) is generated using the information provided in spline_design, producing a q-dimensional cubic B-spline basis with equally spaced knots.

The latent process basis coordinates are generated as iid Gaussian random variables with standard deviation process_options$sigma_coord. Each latent process is given by

z_{i,r}(x) = w_{i,r}^{T}B(x).

Then, the n \times n symmetric adjacency matrix for snapshot k=1,...,m has independent Gaussian entries with standard deviation sigma_edge and mean

E([A_k]_{ij}) = z_i(x_k)^{T}z_j(x_k)

for i \leq j (or i < j with no self loops).

Value

A list is returned with the realizations of the basis coordinates, spline design, and the multiplex network snapshots:

A

An array of dimension n \times n \times m, the realized functional network data.

W

An array of dimension n \times q \times d, the realized basis coordinates.

spline_design

A list, describing the B-spline design:

type

The string 'bs'.

q

A positive integer, the dimension of the B-spline basis.

x_vec

A vector, the snapshot evaluation indices for the data.

x_max

A scalar, the maximum of the index space.

x_min

A scalar, the minimum of the index space.

spline_matrix

An m \times q matrix, the B-spline basis evaluated at the snapshot indices.

Examples


# Gaussian edge data with B-spline latent processes, Gaussian coordinates
# NOTE: x_vec is automatically populated given m

data <- gaussian_snapshot_bs(n=100,d=4,m=100,
                             self_loops=FALSE,
                             spline_design=list(q=12),
                             sigma_edge=3,
                             process_options=list(sigma_coord=.75))


[Package fase version 1.0.1 Index]