LINNA
Linna (Likelihood Inference Neural Network Accelerator) is a tool to accelerate Bayesian posterior inferences using artificial neural networks.
Linna automatically builds training data, trains the neural network, and produces a Markov chain that samples the posterior.
Reduces the runtime of survey cosmological analyses of the Dark Energy Survey by a factor 8-50.
Linna is verified to enable accurate and efficicient sampling for Vera Rubin Observatory’s Legacy Survey of Space and Time (LSST) year 10 multi-probe analyses.
- Linna is explicity verified for the following three multi-probe analysese:
3x2pt, a joint analysis of galaxy clustering, galaxy–galaxy lensing, and cosmic shear.
4x2pt+N, a joint analysis of cluster–galaxy cross correlations, cluster lensing, cluster clustering, and cluster abundances.
6x2pt+N, a joint analysis of data vectors in 3x2pt and 4x2pt+N.
Documentation
Read the docs at https://linna.readthedocs.io/en/latest/readme.html#documentation
Installation
git clone https://github.com/chto/linna.git cd linna python setup.py install
Example
For example, if you want to sample a 33 dimensional gaussian spaces, you can do
import numpy as np
import matplotlib.pyplot as plt
from linna.main import ml_sampler
from linna.util import *
#Define gaussian
ndim = 33
init = np.random.uniform(size=ndim)
means = np.random.uniform(size=ndim)
cov = np.diag(0.1*np.random.uniform(size=ndim))
priors = []
for i in range(ndim):
priors.append({
'param': 'test_{0}'.format(i),
'dist': 'flat',
'arg1': -5.,
'arg2': 5.
})
def theory(x, outdirs):
x_new = deepcopy(x[1])
return x_new
#LINNA
nwalkers = 4 #Number of mcmc walker
pool = None
outdir = os.path.abspath(os.getcwd())+"/out/2dgaussian/"
chain, logprob = ml_sampler(outdir, theory, priors, means, cov, init, pool, nwalkers, gpunode=None, nepoch=101)
History
0.0.1 (2022-01-18)
First release on PyPI.
Metadata
Release files for linna 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| linna-0.0.3.tar.gz | 980.6 kB | Without provenance | Details for linna-0.0.3.tar.gz |
Release files / linna-0.0.3.tar.gz
| Download URL | linna-0.0.3.tar.gz |
|---|---|
| Size | 980.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be00314ba9b4009ba65c112233f3bfd3982f5e7ad50bbab7e51fa3310506783c
|
|
BLAKE2b-256 checksum How to use checksums |
e26ce3861cbe57a1b9c48ca69cae313ce85b75c16d48282e6aed36b2bc7caa68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.2 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
|
Security for linna 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.