Hi.

I think you need to distinguish between sampling the space of DAGs (for a
fixed number of nodes) from sampling the space of probability
distributions over the nodes.  I don't think that sampling the former
uniformly will necessarily sample the latter uniformly.

The algorithm that I use to sample the space of DAGs for a fixed number of
nodes is as follows:

(1) Generate a random ordering over the nodes
(2) Generate a lower-triangular structure matrix of 0's and 1's.

If you can sample the ordering from a uniform distribution, I believe this
should sample the space of DAGs from a uniform distribution, although
admittedly I have never sought a proof of this.

(1) can be achieved by randomly shuffling an ordering sufficiently many
times.  There is a C++ standard function called random_shuffle that
purports to do this.  Again, by symmetry I believe this should sample from
a uniform distribution, but I haven't sought a proof.


Cheers,
Denver.


On Fri, 26 Oct 2001, Fabio Gagliardi Cozman wrote:

> Dear UAIers,
>
>       I would appreciate if anyone could give some pointers
>       on how to generate Bayesian networks randomly. That is,
>       how to construct directed acyclic graphs and their
>       associated parameters in a way that uniformly samples
>       the space of the DAGs? I have not found a simple explanation
>       on how to do it, even though many papers refer to networks
>       that have been generated randomly. I wonder if there is
>       software available for this.
>
>       Maybe the problem is simple, but it does seem to require
>       some sophistication. Even to generate the conditional
>       probabilities, it does not seem that simply generating
>       tuples and normalizing them will uniformly sample the
>       space of probability distributions.
>
>       Any help is appreciated. Thanks,
>
>                       Fabio Cozman
>

Reply via email to