Description Usage Arguments Value Author(s) See Also Examples
View source: R/generateNetwork.R
This function generates a random network with changepoints for structure changes, for simulating synthetic data.
1 2 3 |
lambda_2 |
Average number of parents for each node in the network (parameter for a Poisson distribution). |
q |
Number of nodes. |
min_phase_length |
Minimum segment length. |
k_bar |
Maximum number of changepoints. If |
l |
Length of the time series. |
lambda_3 |
Average number of structure changes between two segments (parameter for a Poisson distribution). |
spacing |
|
gauss_weights |
|
same |
|
change_method |
|
fixed |
|
cps |
Changepoint locations (if they are fixed). |
A list with the following elements:
network |
The network, a list of length NumSegs, where each element is a NumNodes by NumNodes matrix. |
epsilon |
The vector of changepoint locations. |
k |
The number of changepoint. |
changes |
The number of changes among segments. |
Frank Dondelinger
1 2 3 4 5 6 7 8 9 10 11 12 | # Generate random network with default parameters
network = generateNetwork()
# Simulate data using generated network
dataset = simulateNetwork(net=network)
# Generate random network with 4 changepoints and 15 nodes,
# with changepoints distributed over a timeseries of length 50
network = generateNetwork(l=50, q=15, fixed=TRUE, k_bar=4)
# Simulate data of length 50 using generated network
dataset = simulateNetwork(net=network)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.