Skip to main content

perform bayesian inference over physical models

Project description

Version

Havi

stands for Odin

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

havi-0.1.1.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

havi-0.1.1-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page