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
ito nodejis denoted byA[i, j] = 1. Absence of the edge is denote byA[i, j] = 0.