neilgirdhar / efax Goto Github PK
View Code? Open in Web Editor NEWExponential families for JAX
License: MIT License
Exponential families for JAX
License: MIT License
See wikipedia. Also, depends on #12
This would help with creating distributions like the normal-gamma distribution, and the normal inverse-Wishart distribution.
Depends on google/jax#2488
Thanks for creating such a nice library.
I have experienced numerical instability in the Multivariate Gaussian Distributions. For better numerical stability, I wondered if it would be better replace e.g.,
With Choleksy based operations e.g.,
import jax.scipy as jsp
JITTER = 1e-6
half_precision = self.negative_half_precision
lower_h = jsp.linalg.cholesky(half_precision + JITTER * jnp.eye(half_precision.shape[0]))
lower_h_inv = jsp.linalg.solve_triangular(lower_h, jnp.eye(half_precision.shape[0]), lower=True)
h_inv = -jsp.linalg.solve_triangular(lower_h, lower_h_inv, lower=False)
We can also compute log determinant as ld = 2.0 * jnp.sum(jnp.log(jnp.diagonal(lower_h)))
. Downside though on using Cholesky decomposition in JAX, is it really wants you to be doing stuff in float64.
Depends on google/jax#2466
This is now well within reach thanks to th e Array API.
xp = get_namespace(*arrays)
and then use xp
instead of jax.numpy
.xp.special
). Depends on data-apis/array-api#725.abstract_custom_jvp
to PyTorch.NEP 29 says to drop Python 3.8 on April 14, 2023. Use https://github.com/frostming/fix-future-annotations to upgrade the code.
Wait on python/mypy#14072
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.