gaussian_snapshot_ss {fase}R Documentation

Simulate Gaussian edge networks with nonparametric latent processes

Description

gaussian_snapshot_ss simulates a realization of a functional network with Gaussian edges, according to an inner product latent process model. The latent processes are randomly generated sinusoidal functions.

Usage

gaussian_snapshot_ss(n,d,m,x_vec,self_loops=TRUE,
                     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 x_vec.

x_vec

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

self_loops

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

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:

amplitude

A positive scalar, the maximum amplitude of the randomly generated latent processes. Defaults to 3.

frequency

A positive scalar, frequency of the randomly generated latent processes. Defaults to 2.

sigma_int

A positive scalar, or a vector of length d. If it is a vector, the entries correspond to the standard deviation of the random intercepts of the node processes for each latent dimension. If is is a scalar, it corresponds to the standard deviation of the random intercepts in all dimensions. Defaults to 0.5.

return_fn

A Boolean, if TRUE, then the latent processes are returned as a function which takes a vector of indices and returns the corresponding evaluations of the latent process matrices. Otherwise, the latent processes are returned as an n \times d \times m array evaluated at the prespecified snapshot indices. Defaults to FALSE.

Details

The the latent process for node i in latent dimension r is given independently by

z_{i,r}(x) = \frac{a \sin [2f\pi(x - U) / (x_{max} - x_{min})]}{1 + (2a-1)[x + B(x_{max} - 2x)]} + G

Where G is Gaussian with mean 0 and standard deviation \sigma_{int,r}, B is Bernoulli with mean 1/2, and U is uniform with minimum spline_design$x_min and maximum spline_design$x_max. f is a frequency parameter specified with process_options$frequency, and a is a maximum amplitude parameter specified with process_options$amplitude. Roughly, each process is a randomly shifted sine function which goes through f cycles on the index set, with amplitude either increasing or decreasing between 1/2 and a.

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).

This function may return the latent processes as an n \times d \times m array evaluated at the prespecified snapshot indices, or as a function which takes a vector of indices and returns the corresponding evaluations of the latent process matrices. It also returns the spline design information required to fit a FASE embedding to this data with a natural cubic spline.

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.

Z

If process_options$return_fn is TRUE, a function, which takes a vector of indices and returns the corresponding evaluations of the latent process matrices. Otherwise, an array of dimension n \times d \times m, the latent processes evaluated at the prespecified snapshot indices.

spline_design

A list, describing the B-spline design:

type

The string 'ss'.

x_vec

A vector, the snapshot evaluation indices for the data.

Examples


# Gaussian edge data with sinusoidal latent processes
# NOTE: latent processes are returned as a function

data <- gaussian_snapshot_ss(n=100,d=2,
                             x_vec=seq(0,3,length.out=80),
                             self_loops=TRUE,
                             sigma_edge=4,
                             process_options=list(amplitude=4,
                                                  frequency=3,
                                                  return_fn=TRUE))


[Package fase version 1.0.1 Index]