Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to version 0.2.0, update references, unpin polyagamma #3

Merged
merged 6 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -38,7 +38,7 @@ jobs:
needs: lint
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -51,7 +51,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-8 g++-8 ninja-build
python -m pip install --upgrade pip wheel setuptools
pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install torch==2.3.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install .[test]
pip install coveralls
pip freeze
Expand Down
23 changes: 14 additions & 9 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Martin Jankowiak: [email protected]
References
----------

* Jankowiak, M., 2022. `Bayesian Variable Selection in a Million Dimensions <https://arxiv.org/abs/2208.01180>`__ arXiv preprint arXiv:2208.01180.
* Jankowiak, M., 2023. `Bayesian Variable Selection in a Million Dimensions <https://proceedings.mlr.press/v206/jankowiak23a.html>`__ AISTATS 2023.

* Zanella, G. and Roberts, G., 2019. `Scalable importance tempering and Bayesian variable selection <https://rss.onlinelibrary.wiley.com/doi/abs/10.1111/rssb.12316>`__. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 81(3), pp.489-517.

Expand All @@ -153,12 +153,17 @@ If you use millipede please consider citing:

::

@article{jankowiak2022bayesian,
title={Bayesian Variable Selection in a Million Dimensions},
author={Martin Jankowiak},
journal={arXiv preprint arXiv:{2208.01180},
year={2022},
eprint={2208.01180},
archivePrefix={arXiv},
primaryClass={stat.ME}
@InProceedings{pmlr-v206-jankowiak23a,
title = {Bayesian Variable Selection in a Million Dimensions},
author = {Jankowiak, Martin},
booktitle = {Proceedings of The 26th International Conference on Artificial Intelligence and Statistics},
pages = {253--282},
year = {2023},
volume = {206},
series = {Proceedings of Machine Learning Research},
month = {25--27 Apr},
publisher = {PMLR},
pdf = {https://proceedings.mlr.press/v206/jankowiak23a/jankowiak23a.pdf},
url = {https://proceedings.mlr.press/v206/jankowiak23a.html},
}

2 changes: 1 addition & 1 deletion millipede/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.0"
__version__ = "0.2.0"

from millipede.binomial import CountLikelihoodSampler
from millipede.normal import NormalLikelihoodSampler
Expand Down
4 changes: 2 additions & 2 deletions millipede/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def safe_cholesky(A, epsilon=1.0e-8):
if A.shape == (1, 1):
return A.sqrt()
try:
return torch.linalg.cholesky(A)
return torch.linalg.cholesky(A, upper=False)
except RuntimeError as e:
Aprime = A.clone()
jitter_prev = 0.0
Expand All @@ -29,7 +29,7 @@ def safe_cholesky(A, epsilon=1.0e-8):
Aprime.diagonal(dim1=-2, dim2=-1).add_(jitter_new - jitter_prev)
jitter_prev = jitter_new
try:
return torch.linalg.cholesky(Aprime)
return torch.linalg.cholesky(Aprime, upper=False)
except RuntimeError:
continue
raise e
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
install_requires=[
"torch>=1.11",
"pandas",
"polyagamma==1.3.2",
"polyagamma",
"tqdm",
],
extras_require={
Expand Down
2 changes: 1 addition & 1 deletion tests/test_count_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@pytest.mark.parametrize("subset_size", [12, None])
@pytest.mark.parametrize("variable_S", [False, True])
def test_binomial(subset_size, variable_S, streaming=False, N=512, P=16, T=2000, T_burnin=200, intercept=0.17, seed=1):
def test_binomial(subset_size, variable_S, streaming=False, N=512, P=16, T=2000, T_burnin=500, intercept=0.17, seed=1):
torch.manual_seed(seed)
X = torch.randn(N, P).double()
X_assumed = torch.randn(N, 2).double()
Expand Down