RandomCauchyDAGSampler#

class sdm.prior.RandomCauchyDAGSampler(num_nodes: HP[int] | int)#

Bases: DAGSampler

Sample DAGs with Cauchy-distributed connectivity parameters.

For node indices i < j, the edge i -> j is placed with probability

p_ij = sigmoid(A + B_i + C_j)

where A, B_i, C_j are independent standard Cauchy random variables.

A controls the overall connectivity level; B_i controls node i’s outgoing tendency; C_j controls node j’s incoming tendency.

Parameters:

num_nodes (HP[int] | int) – Node count.

sample(generator: Generator | None = None) → DAG#

Sample a graph without feature or target assignments.

Parameters:

generator (Generator | None) – Pseudorandom generator.

Return type:

DAG