causally.scm.scm.LinearModel.sample

LinearModel.sample() Tuple[array, array]

Sample a dataset of observations.

Returns:

  • X (np.array, shape (num_samples, num_nodes)) – Numpy array with the generated dataset.

  • A (np.array, shape (num_nodes, num_nodes)) – Numpy adjacency matrix representation of the causal graph. The presence of a directed edge from node i to node j is denoted by A[i, j] = 1. Absence of the edge is denote by A[i, j] = 0.