{"id":18422494,"url":"https://github.com/sri-csl/dnre","last_synced_at":"2025-04-13T12:57:32.002Z","repository":{"id":207596621,"uuid":"719639111","full_name":"SRI-CSL/dnre","owner":"SRI-CSL","description":"Code accompanying paper: Direct Amortized Likelihood Ratio Estimation","archived":false,"fork":false,"pushed_at":"2023-11-21T22:23:17.000Z","size":1701,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-13T12:57:28.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/SRI-CSL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-11-16T15:37:33.000Z","updated_at":"2023-11-20T02:07:29.000Z","dependencies_parsed_at":"2024-11-06T04:32:10.961Z","dependency_job_id":null,"html_url":"https://github.com/SRI-CSL/dnre","commit_stats":null,"previous_names":["sri-csl/dnre"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdnre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdnre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdnre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fdnre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SRI-CSL","download_url":"https://codeload.github.com/SRI-CSL/dnre/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717274,"owners_count":21150389,"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-11-06T04:30:25.725Z","updated_at":"2025-04-13T12:57:31.976Z","avatar_url":"https://github.com/SRI-CSL.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code accompanying paper: Direct Amortized Likelihood Ratio Estimation\n\nTo run the code in this repository, first run:\n\n```\npip install .\n```\n\nThis repository contains:\n\n* `./notebooks/quadcopter_example.ipynb`: This is an example notebook that runs all three likelihood ratio estimators (DNRE, BNRE, NRE) to both train and sample quadcopter designs.\n* `./src/dnre/benchmark.py`: This code runs the benchmark using the following command:\n    ```\n    python src/dnre/benchmark.py --model_type dnre --task two_moons --save_dir ./benchmark_results/two_moons/dnre --device 0\n    ```\n    Where we have selected DNRE as the approach to perform grid search over in the above command. The code includes comments for all additional options.\n    \n* `./src/dnre/benchmark_evaluate.py`: This code evaluates the above best result from the grid search using the following command:\n    ```\n    python src/dnre/benchmark_evaluate.py --model_type dnre --task two_moons --path_dir ./benchmark_results/two_moons/dnre --device 0 --metric coverage\n    ```\n    Where we point to the same directory as above. This will evaluate the expected coverage, but there are also options for C2ST and the log posterior.\n* `./data/data_dict_4490`: Contains the data from the quadcopter experiment.\n\n## Acknowledgements\n\nThis project was supported by DARPA under the Symbiotic\nDesign for Cyber-Physical Systems (SDCPS) with contract\nFA8750-20-C-0002.\nThe views, opinions and/or findings expressed\nare those of the author and should not be interpreted as\nrepresenting the official views or policies of the Department\nof Defense or the U.S. Government.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fdnre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsri-csl%2Fdnre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fdnre/lists"}