Releases: JiaYaobo/fenbux
Releases · JiaYaobo/fenbux
fenbux v0.1.0 release! ! !
In this version, mainly
- Add a
bijector
module, includingExp
,Log
,Scale
,Tanh
etc. bijectors, and - related functions
transform
,evaluate
,ladj
,ildj
etc.
Usage:
Evaluate a bijector
import jax.numpy as jnp
from fenbux.bijector import Exp, evaluate
bij = Exp()
x = jnp.array([1., 2., 3.])
evaluate(bij, x)
Apply a bijector to a distribution
import jax.numpy as jnp
from fenbux.bijector import Exp, transform
from fenbux.univariate import Normal
from fenbux import logpdf
dist = Normal(0, 1)
bij = Exp()
log_normal = transform(dist, bij)
x = jnp.array([1., 2., 3.])
logpdf(log_normal, x)