Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
JaxKern is Python library for working with kernel functions in JAX. We currently support the following kernels:
In addition to this, we implement kernel approximations using the Random Fourier feature approach.
The following code snippet demonstrates how the first order Matérn kernel can be computed and, subsequently, approximated using random Fourier features.
import jaxkern as jk
import jax.numpy as jnp
import jax.random as jr
key = jr.PRNGKey(123)
# Define the points on which we'll evaluate the kernel
X = jr.uniform(key, shape = (10, 1), minval=-3., maxval=3.)
Y = jr.uniform(key, shape = (20, 1), minval=-3., maxval=3.)
# Instantiate the kernel and its parameters
kernel = jk.Matern32()
params = kernel.init_params(key)
# Compute the 10x10 Gram matrix
Kxx = kernel.gram(params, X)
# Compute the 10x20 cross-covariance matrix
Kxy = kernel.cross_covariance(params, X, Y)
# Build a RFF approximation
approx = RFF(kernel, num_basis_fns = 5)
rff_params = approx.init_params(key)
# Build an approximation to the Gram matrix
Qff = approx.gram(rff_params, X)
All kernels are supplied with a gram
and cross_covariance
method. When computing a Gram matrix, there is often some structure in the data (e.g., Markov) that can be exploited to yield a sparse matrix. To instruct JAX how to operate on this, the return type of gram
is a Linear Operator from JaxLinOp.
Within GPJax, all kernel computations are handled using JaxKern.
A full set of documentation is a work in progress. However, many of the details in JaxKern can be found in the GPJax documentation.
FAQs
Kernels in Jax.
We found that jaxkern-nightly demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.