Learn R Programming

discretecdAlgorithm (version 0.0.7)

data_gen: data_gen

Description

A function that generate discrete data set.

Usage

data_gen(
  graph,
  n,
  ivn = NULL,
  n_levels = NULL,
  params = NULL,
  FUN = NULL,
  flip = TRUE
)

Arguments

graph

a edgeList object.

n

size of the data set, a scalar

ivn,

a list of intervention for each data point.

n_levels,

a list of number of levels for each node, default is binary data set.

params,

coefficient list (optional).

FUN,

a function to generate magnitude of influence (optional).

flip,

a bool parameter. If true, when generating coefficients, will randomly flip the sign of coefficients.

Value

data matrix