{"id":16554626,"url":"https://github.com/hayesall/unidags","last_synced_at":"2025-07-09T17:06:03.397Z","repository":{"id":104969197,"uuid":"341601451","full_name":"hayesall/UniDAGs","owner":"hayesall","description":"🦄 Uniformly distributed samples of directed acyclic graphs for random Bayesian Networks","archived":false,"fork":false,"pushed_at":"2021-02-23T15:34:59.000Z","size":50,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-09T17:05:56.126Z","etag":null,"topics":["bayesian-networks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hayesall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-23T15:34:38.000Z","updated_at":"2023-07-12T13:51:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d1ee607-9575-469f-bcb7-8d6f51ab85ca","html_url":"https://github.com/hayesall/UniDAGs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hayesall/UniDAGs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayesall%2FUniDAGs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayesall%2FUniDAGs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayesall%2FUniDAGs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayesall%2FUniDAGs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hayesall","download_url":"https://codeload.github.com/hayesall/UniDAGs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayesall%2FUniDAGs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502127,"owners_count":23618554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian-networks"],"created_at":"2024-10-11T19:51:58.819Z","updated_at":"2025-07-09T17:06:03.231Z","avatar_url":"https://github.com/hayesall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦄 UniDAGs\n\n\u003e \"*Uniformly distributed samples of directed acyclic graphs for random Bayesian Networks.*\"\n\n## Overview\n\nBased on Ide and Cozman 2002 \"*Random Generation of Bayesian Networks*.\" Which presented algorithms for generating random Bayesian network structures in the form of:\n\nTrees:\n\n![](docs/tree1.png)\n\nDirected Acyclic Graphs:\n\n![](docs/graph1.png)\n\n... and Polytrees:\n\n![](docs/polytree1.png)\n\n## Notes and Warnings\n\n⚠️ \"Algorithm 2\" for random polytree generation does not match the\nalgorithm presented in the paper. Using it currently prints a warning to the console.\n\n## Getting Started\n\nThis only requires `networkx\u003e=2.5` currently:\n\n```console\npip install -r requirements.txt\n```\n\nMethods for generating structures can be imported:\n\n```python\n\u003e\u003e\u003e from unidag.generate import random_tree_graph\n\u003e\u003e\u003e from unidag.generate import multi_dag\n\u003e\u003e\u003e from unidag.generate import polytree\n```\n\nA main module provides an interface to choose (1) number of nodes, (2) number of\niterations for the Markov chain, and (3) an algorithm `{tree,polytree,graph}`.\nFor options and further instructions, pass a `--help` flag:\n\n```console\npython unidag/generate.py --help\n```\n\n## Acknowledgements\n\n### BibTex\n\n```bibtex\n@inproceedings{ide2002randomgeneration,\n  author=\"Ide, Jaime S. and Cozman, Fabio G.\",\n  editor=\"Bittencourt, Guilherme and Ramalho, Geber L.\",\n  title=\"Random Generation of Bayesian Networks\",\n  booktitle=\"Advances in Artificial Intelligence\",\n  year=\"2002\",\n  publisher=\"Springer Berlin Heidelberg\",\n  address=\"Berlin, Heidelberg\",\n  pages=\"366--376\",\n  isbn=\"978-3-540-36127-5\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayesall%2Funidags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhayesall%2Funidags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayesall%2Funidags/lists"}