{"id":13655245,"url":"https://github.com/ermongroup/bgm","last_synced_at":"2025-05-08T01:21:03.197Z","repository":{"id":104481704,"uuid":"111345000","full_name":"ermongroup/bgm","owner":"ermongroup","description":"Code for \"Boosted Generative Models\", AAAI 2018.","archived":false,"fork":false,"pushed_at":"2017-12-26T03:37:31.000Z","size":79,"stargazers_count":20,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T16:09:29.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ermongroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-20T00:50:16.000Z","updated_at":"2023-03-31T19:24:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"13dfc1c8-0c4f-496f-86ac-9e8df4d73342","html_url":"https://github.com/ermongroup/bgm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermongroup%2Fbgm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermongroup%2Fbgm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermongroup%2Fbgm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermongroup%2Fbgm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ermongroup","download_url":"https://codeload.github.com/ermongroup/bgm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252979415,"owners_count":21835049,"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":[],"created_at":"2024-08-02T03:01:00.285Z","updated_at":"2025-05-08T01:21:03.178Z","avatar_url":"https://github.com/ermongroup.png","language":"Python","readme":"Boosted Generative Models\n============================================\n\nThis repository provides a reference implementation for boosted generative models as described in the paper:\n\n\n\u003e Boosted Generative Models  \n[Aditya Grover](https://aditya-grover.github.io) and [Stefano Ermon](https://cs.stanford.edu/~ermon/).   \nAAAI Conference on Artificial Intelligence (AAAI), 2018.  \nhttps://arxiv.org/pdf/1702.08484.pdf\n\n\n### Requirements\n\nThe codebase is implemented in Python 3.6. To install the necessary requirements, run the following commands:\n\n```\npip install -r requirements.txt\nbash install.sh\n```\n\n### Datasets\n\nThe code takes an input dataset in csv file. Every row indicates one datapoint with comma-separated features. A sample train, validation, and test file for the `nltcs` dataset is included in the  `data/` directory.\n\n\n### Options\n\nLearning and inference of boosted generative models is handled by the `main.py` script which provides the following command line arguments.\n\n```\n  --seed INT                 Random seed for numpy, tensorflow\n  --datadir STR              Directory containing dataset files\n  --dataset STR              Name of dataset\n  --resultdir STR            Directory for saving tf checkpoints\n  --run-addbgm BOOL          Runs additive boosting if True\n  --addbgm-alpha FLOAT LIST  Space-separated list of model weights for additive boosting\n  --run-genbgm BOOL          Runs multiplicative generative boosting if True\n  --genbgm-alpha FLOAT LIST  Space-separated list of model weights for multiplicative generative boosting\n  --genbgm-beta FLOAT LIST   Space-separated list of reweighting exponents for multiplicative generative boosting\n  --run-discbgm BOOL         Runs multiplicative discriminative boosting if True\n  --discbgm-alpha FLOAT LIST Space-separated list of model weights for multiplicative generative boosting\n  --discbgm-epochs INT       Number of epochs of training for each discriminator\n  --discbgm-burn-in INT      Number of discarded burn in samples for Markov chains\n  --run-classifier BOOL      Uses generative model for classification if True\n```\n\n\n### Examples\n\nThe following commands learns boosted ensembles with two models and evaluates the ensemble for density estimation and classification.\n\nMeta-algorithm: multiplicative generative boosting\n\n```\npython src/main.py --dataset nltcs --run-genbgm --genbgm-alpha 0.5 0.5 --genbgm-beta 0.25 0.125 --run-classifier\n```\n\nMeta-algorithm: multiplicative discriminative boosting\n\n```\npython src/main.py --dataset nltcs --run-discbgm --discbgm-alpha 1. 1. --run-classifier\n```\n\nMeta-algorithm: additive boosting\n\n```\npython src/main.py --dataset nltcs --run-addbgm --addbgm-alpha 0.5 0.25 --run-classifier\n```\n\n\nYou can also run any combination of the meta-algorithms together as shown below.\n```\npython src/main.py --dataset nltcs --run-genbgm --genbgm-alpha 0.5 0.5 --genbgm-beta 0.25 0.125 --run-discbgm --discbgm-alpha 1. 1. --run-addbgm --addbgm-alpha 0.5 0.25 --run-classifier\n```\n\n\n### Citing\n\nIf you find boosted generative models useful in your research, please consider citing the following paper:\n\n\n\u003e@inproceedings{grover2018boosted,  \n  title={Boosted Generative Models},  \n  author={Grover, Aditya and Ermon, Stefano},  \n  booktitle={AAAI Conference on Artificial Intelligence},  \n  year={2018}}\n","funding_links":[],"categories":["2018"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fermongroup%2Fbgm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fermongroup%2Fbgm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fermongroup%2Fbgm/lists"}