Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sri-csl/dnre
Code accompanying paper: Direct Amortized Likelihood Ratio Estimation
https://github.com/sri-csl/dnre
Last synced: about 2 months ago
JSON representation
Code accompanying paper: Direct Amortized Likelihood Ratio Estimation
- Host: GitHub
- URL: https://github.com/sri-csl/dnre
- Owner: SRI-CSL
- License: mit
- Created: 2023-11-16T15:37:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-21T22:23:17.000Z (about 1 year ago)
- Last Synced: 2023-11-21T23:28:38.727Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 1.62 MB
- Stars: 1
- Watchers: 18
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Code accompanying paper: Direct Amortized Likelihood Ratio Estimation
To run the code in this repository, first run:
```
pip install .
```This repository contains:
* `./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.
* `./src/dnre/benchmark.py`: This code runs the benchmark using the following command:
```
python src/dnre/benchmark.py --model_type dnre --task two_moons --save_dir ./benchmark_results/two_moons/dnre --device 0
```
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.
* `./src/dnre/benchmark_evaluate.py`: This code evaluates the above best result from the grid search using the following command:
```
python src/dnre/benchmark_evaluate.py --model_type dnre --task two_moons --path_dir ./benchmark_results/two_moons/dnre --device 0 --metric coverage
```
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.
* `./data/data_dict_4490`: Contains the data from the quadcopter experiment.## Acknowledgements
This project was supported by DARPA under the Symbiotic
Design for Cyber-Physical Systems (SDCPS) with contract
FA8750-20-C-0002.
The views, opinions and/or findings expressed
are those of the author and should not be interpreted as
representing the official views or policies of the Department
of Defense or the U.S. Government.