iscan.utils.DataGenerator.sample

iscan.utils.DataGenerator.sample(n: int, num_shifted_nodes: int, change_struct: bool = False, use_gp: bool = False) tuple[numpy.ndarray, numpy.ndarray]

Samples two datasets from randomly generated DAGs

Parameters:
n : int

Number of samples

num_shifted_nodes : int

Desired number of shifted nodes. Actual number can be lower.

change_struct : bool, optional

Whether or not to sample from DAGs with different structures, by default False.

use_gp : bool, optional

Whether or not to sample from Gaussian Processes, by default True.

Returns:

Two datasets with shape [n, d]

Return type:

Tuple[np.ndarray, np.ndarray]

Raises:

NotImplementedError – The case of sampling from GPs when the structures are differents is not implemented.


Last update: Jan 14, 2024