perform bayesian inference over physical models
Project description
Havi
scatering model and bayesian inference
Note from author
If you use our library on a research or paper please give us a citation
Installation
pip install havi
Usage
import havi as h
# scatering angles
incident_angles = [theta, phi, psi] # incidence angles - floats
scatered_angles = [theta, phi, psi] # scatering angles - floats
wavelength = 0.5
havi = h.Havi(incident_angles, scatered_angles, wavelength)
# surface boudaries for random variables
rms_height = (0.1, 0.8) # lower and higher boundaries
correlation_longitude = (0.1, 0.8) # lower and higher boundaries
dielectric_constant = (0.1, 0.8) # lower and higher boundaries
havi.set_boundaries(rms_height, correlation_longitude, dielectric_constant)
sigma = h.Tensor([0.5])
observed_data = h.Tensor([-12,-7,-8])
trace = havi.inference(sigma, observed) # you can plot the trace however you want OR
havi.plot()
API
This package exports:
A pytorch Tensor type
havi.Tensor
Our inference model abstraction, holds data of incident wave, scatered wave and their wave length:
havi.Havi(incident_angles: List[float], scatered_angles: List[float], wavelength: float)
Set boundaries for probabilistic variables
Havi.set_boundaries(rms_height: Tuple[float], correlation_longitude: Tuple[float], dielectric_constant: Tuple[float]) -> None
Runs MCMC(Monte Carlo Markov Chain) bayesian inference with NUTS kernel over scatering model
Havi.inference(sigma: Tensor, observed: Tensor) -> trace: dict
Plots all of the traced values from MCMC bayesian inference
Havi.plot() -> None
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file havi-0.1.1.tar.gz.
File metadata
- Download URL: havi-0.1.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06aadeace922aedaeff3e8d602ecd3c65f33df26c52f6d05a4c8411c61707913
|
|
| MD5 |
d6475d4cbb60f86ac753e74d6711e32e
|
|
| BLAKE2b-256 |
62c0a8bbe16f8c225e6b56ed2292498aa02c4193032d9406d759c17309e6e99b
|
File details
Details for the file havi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: havi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b05631e2c449c8566208ce00fd4b0fd60319d619682cc7120eeb27d7350546d
|
|
| MD5 |
c73f1146ab17a2eb7ff84c3334e84c67
|
|
| BLAKE2b-256 |
59e7f1057389cf8d631664531356ab2c9e7e5463f78101276bd7005e12864609
|