https://github.com/imperialcollegelondon/gsvgd
Code for "Grassmann Stein Variational Gradient Descent" (AISTATS 2022)
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Repository
Code for "Grassmann Stein Variational Gradient Descent" (AISTATS 2022)
Basic Info
Statistics
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
GSVGD
Data
Covertype data is downloaded from https://archive.ics.uci.edu/ml/datasets/covertype
Other Dependencies
- Code for Sliced-SVGD is adapted from Wenbo Gong's repo
- Code for optimization on Grassmann manifold is adapted from Pymanopt
Run experiments
The code below provides an example of running the numerical experiments in the paper.
- The .sh scripts assume 8 GPUs are available. You can also use CPUs by changing the --gpu argument in these scripts to --gpu=-1.
- Note: These experiments can take several hours to finish, since they encompass various configurations of dimensions/sample sizes, along with multiple repetitions. If you wish to obtain results faster, you can reduce the number of configurations accordingly in the .sh scripts.
To run:
1. Install the GSVGD module
pip install -e .
2. Run experiments (the full experiments can take several hours)
```
e.g.1 run multivariate gaussian experiment and generate plots
sh scripts/run_gaussian.sh
e.g.2 run conditioned diffusion and generate plots
sh scripts/run_diffusion.sh ```
Basic usage
``python
'''
distribution: target distribution class withlog_prob` method (up to a constant term)
kernel: instance of kernel class
manifold: instance of Grassmann manifold class for projector update
optimizer: instance of optimizer class for particle update
delta: stepsize for projector update T: initial temperature T0 X: initial particles A: initial projectors m: number of projectors epochs: number of iterations '''
instantiate GSVGD class
gsvgd = FullGSVGDBatch( target=distribution, kernel=kernel, manifold=manifold, optimizer=optimizer, delta=delta, T=T )
update particles
_ = gsvgd.fit(X=X, A=A, m=m, epochs=epochs, threshold=0.0001*m)
final particles: X (updates are done in-place)
```
Run tests
python
python -m pytest
Code directory
.
requirements.txt: Dependencies.
setup.py: Setup script.
data: covertype data.
experiments: main scripts for the 5 numerical experiments.
plots: folder to hold plots.
scripts: Shell scripts to run the experiments and generate plots.
src: Source files for implementing each sampling method, and util functions for experiments.
Sliced_KSD_Clean: Utils for Sliced SVGD adapted from Wenbo Gong.
blr.py: Utils for Bayesian logistic regression.
diffusion.py: Utils for conditioned duffition.
gsvgd.py: GSVGD class (main).
kernel.py: Kernel class.
manifold.py: Class for optimisation on the Grassmann manifold, adapted from Pymanopt
metrics.py: Metric class for evaluation of results.
s_svgd.py: S-SVGD class, adapted from Wenbo Gong.
svgd.py: SVGD class.
utils.py: Other utils.
tests: unittests
thumbnail: Thumbnail fig.
README.md
Owner
- Name: Imperial College London
- Login: ImperialCollegeLondon
- Kind: organization
- Email: icgithub-support@imperial.ac.uk
- Location: Imperial College London
- Repositories: 311
- Profile: https://github.com/ImperialCollegeLondon
Imperial College main code repository
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| XingLLiu | l****5@o****m | 56 |
| Xing Liu | 4****u | 8 |
| Harrison Zhu | h****5@i****k | 2 |
| Harrison Zhu | 3****8 | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 1
- Total pull requests: 8
- Average time to close issues: N/A
- Average time to close pull requests: 5 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 2.0
- Average comments per pull request: 0.63
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- heyzude (1)
Pull Request Authors
- XingLLiu (8)
