Capability index¶
Every public name in gauss_flows_maps and gauss_flows_models (104 of them), each listed once at
its public home and grouped by the module that defines it, with the
first sentence of its docstring; then the public API of flowjax, equinox, paramax, functax, optimistix, diffrax. Search this page before
writing a helper: if what you need is here, compose it; if it is almost
here, extend it where it lives. Regenerate with uv run poe capabilities
after changing a public API (tests/test_capabilities.py checks it is
current).
gauss_flows_maps.bijections¶
Time-gating modules for continuous-time conditional flows. (gauss_flows_maps._src.nn.time_net)¶
| Name | Kind | What it does |
|---|---|---|
TimeFourier |
class | Fourier-feature time gate with g(0) = 0 by construction. |
TimeIdentity |
class | Identity time gate g(t) = t. |
TimeTanh |
class | Tanh time gate with g(0) = 0 by construction. |
Planar normalizing flow (Rezende & Mohamed 2015). (gauss_flows_maps._src.transforms.bijections.classic.planar)¶
| Name | Kind | What it does |
|---|---|---|
PlanarFlow |
class | Planar normalizing-flow bijection (Rezende & Mohamed 2015). |
Sylvester normalizing flow (van den Berg et al. 2018). (gauss_flows_maps._src.transforms.bijections.classic.sylvester)¶
| Name | Kind | What it does |
|---|---|---|
SylvesterFlow |
class | Sylvester normalizing flow (van den Berg et al. 2018). |
Affine coupling layer. (gauss_flows_maps._src.transforms.bijections.coupling.affine)¶
| Name | Kind | What it does |
|---|---|---|
AffineCoupling |
class | Affine coupling layer. |
Circular rational quadratic spline coupling layer (Rezende et al. 2020). (gauss_flows_maps._src.transforms.bijections.coupling.circular_spline)¶
| Name | Kind | What it does |
|---|---|---|
CircularRQSplineCoupling |
class | Coupling layer whose transformer is a circular rational quadratic spline. |
Continuous-time affine coupling layer. (gauss_flows_maps._src.transforms.bijections.coupling.continuous_affine_coupling)¶
| Name | Kind | What it does |
|---|---|---|
ContinuousAffineCoupling |
class | Time-gated affine coupling with optional control conditioning. |
Deep sigmoid coupling layer — single-layer DSF (Huang et al. 2018 NAF §3.2). (gauss_flows_maps._src.transforms.bijections.coupling.deepsigmoid)¶
| Name | Kind | What it does |
|---|---|---|
DeepSigmoidCoupling |
class | Coupling layer with a monotone single-layer sigmoidal transformer. |
Volume-preserving affine coupling layer (GIN; Sorrenson et al. 2020). (gauss_flows_maps._src.transforms.bijections.coupling.gin_coupling)¶
| Name | Kind | What it does |
|---|---|---|
GINCoupling |
class | Volume-preserving affine coupling from Sorrenson et al. (2020). |
Coupling layer with a mixture-of-Gaussians CDF transformer. (gauss_flows_maps._src.transforms.bijections.coupling.mixture_cdf)¶
| Name | Kind | What it does |
|---|---|---|
MixtureGaussianCDFCoupling |
class | Coupling layer whose transformed half goes through a mixture-CDF. |
Rational quadratic spline coupling layer. (gauss_flows_maps._src.transforms.bijections.coupling.spline)¶
| Name | Kind | What it does |
|---|---|---|
RQSplineCoupling |
class | Rational quadratic spline coupling layer. |
Scalar circular rational quadratic spline (Rezende et al. 2020). (gauss_flows_maps._src.transforms.bijections.elementwise.circular_spline)¶
| Name | Kind | What it does |
|---|---|---|
CircularRationalQuadraticSpline |
class | Scalar rational quadratic spline with tied endpoint derivatives. |
Empirical histogram CDF (per-dim) with linear or monotonic-cubic interpolation. (gauss_flows_maps._src.transforms.bijections.elementwise.histogram)¶
| Name | Kind | What it does |
|---|---|---|
HistogramCDF |
class | Marginal Gaussianization via a per-dimension empirical histogram CDF. |
Elementwise inverse Gaussian CDF (probit). (gauss_flows_maps._src.transforms.bijections.elementwise.inverse_gauss)¶
| Name | Kind | What it does |
|---|---|---|
InverseGaussCDF |
class | Apply the inverse Gaussian CDF (probit) element-wise. |
Mixture-CDF marginal bijections: Gaussian and logistic mixtures. (gauss_flows_maps._src.transforms.bijections.elementwise.mixture_cdf)¶
| Name | Kind | What it does |
|---|---|---|
MixtureGaussianCDF |
class | Marginal Gaussianization via a mixture-of-Gaussians CDF. |
MixtureLogisticCDF |
class | Marginal Gaussianization via a mixture-of-logistics CDF. |
An elementwise bijection x ↦ g(x) from a reparametrisation map g. (gauss_flows_maps._src.transforms.bijections.elementwise.reparametrised)¶
| Name | Kind | What it does |
|---|---|---|
Elementwise |
class | The bijection x ↦ y = g(x), elementwise, for a reparametrisation map g. |
Marginal rational quadratic spline bijection. (gauss_flows_maps._src.transforms.bijections.elementwise.spline)¶
| Name | Kind | What it does |
|---|---|---|
RQSplineMarginal |
class | Marginal Gaussianization via rational-quadratic splines. |
Invertible 1x1 convolution (Glow-style, LU-parameterised). (gauss_flows_maps._src.transforms.bijections.linear.conv1x1)¶
| Name | Kind | What it does |
|---|---|---|
Invertible1x1Conv |
class | Invertible 1×1 convolution with LU-parameterised weight (Glow). |
Orthogonal convolution via matrix exponential of a skew-symmetric operator. (gauss_flows_maps._src.transforms.bijections.linear.conv_exp)¶
| Name | Kind | What it does |
|---|---|---|
OrthogonalConvExponential |
class | Orthogonal convolution via the exponential of a skew-symmetric operator. |
Haar wavelet transform bijection (1D, last-axis). (gauss_flows_maps._src.transforms.bijections.linear.haar)¶
| Name | Kind | What it does |
|---|---|---|
HaarWavelet |
class | Haar wavelet transform bijection (1-D, last axis). |
LU-parameterised invertible linear layer + fixed permutation. (gauss_flows_maps._src.transforms.bijections.linear.lu)¶
| Name | Kind | What it does |
|---|---|---|
LULinearPermute |
class | Invertible linear layer via LU decomposition composed with a fixed permutation. |
Closed-form linear neural flow via a matrix exponential. (gauss_flows_maps._src.transforms.bijections.linear.matrix_exponential)¶
| Name | Kind | What it does |
|---|---|---|
MatrixExponential |
class | Closed-form linear neural flow parameterised by exp(W · t). |
Orthogonal 1x1 convolution for Gaussianization flows. (gauss_flows_maps._src.transforms.bijections.linear.orthogonal_conv1x1)¶
| Name | Kind | What it does |
|---|---|---|
Orthogonal1x1Conv |
class | Orthogonal 1x1 convolution (Cayley-parameterised orthogonal mixing). |
Learnable and fixed orthogonal rotations for Gaussianization flows. (gauss_flows_maps._src.transforms.bijections.linear.rotation)¶
| Name | Kind | What it does |
|---|---|---|
FixedRotation |
class | Fixed (non-trainable) orthogonal rotation matrix. |
HouseholderRotation |
class | Orthogonal rotation via a sequence of Householder reflections. |
OrthogonalRotation |
class | Learnable orthogonal rotation via the Cayley map. |
Activation normalization (ActNorm). (gauss_flows_maps._src.transforms.bijections.normalization.actnorm)¶
| Name | Kind | What it does |
|---|---|---|
ActNorm |
class | Activation normalization (ActNorm) for image-shaped events. |
ActNorm1D |
class | Activation normalization (ActNorm) for 1-D events. |
Invertible batch normalization for 1D single-event inputs. (gauss_flows_maps._src.transforms.bijections.normalization.batchnorm)¶
| Name | Kind | What it does |
|---|---|---|
BatchNorm |
class | Invertible batch normalization layer for 1D inputs. |
Generalized Divisive Normalization (GDN). (gauss_flows_maps._src.transforms.bijections.normalization.gdn)¶
| Name | Kind | What it does |
|---|---|---|
GeneralizedDivisiveNormalization |
class | Generalized divisive normalization for image-shaped events (..., C). |
GeneralizedDivisiveNormalization1D |
class | 1-D Generalized divisive normalization with full D x D coupling. |
Learnable circular shift with unit Jacobian. (gauss_flows_maps._src.transforms.bijections.periodic.shift)¶
| Name | Kind | What it does |
|---|---|---|
PeriodicShift |
class | Learnable circular shift on selected periodic dimensions. |
Canonical projection onto [-bound, bound] for selected periodic dimensions. (gauss_flows_maps._src.transforms.bijections.periodic.wrap)¶
| Name | Kind | What it does |
|---|---|---|
PeriodicWrap |
class | Canonical projection of selected dimensions onto [−bound, bound]. |
Volume-preserving squeeze / reshape bijection. (gauss_flows_maps._src.transforms.bijections.reshape.squeeze)¶
| Name | Kind | What it does |
|---|---|---|
Squeeze |
class | Volume-preserving squeeze that trades spatial extent for channels. |
gauss_flows_maps.conditioning¶
Conditioning layers (h, c) → y that transform an inner activation h. (gauss_flows_maps._src.conditioners)¶
| Name | Kind | What it does |
|---|---|---|
AbstractConditioner |
class | Protocol for (h, c) → y conditioning layers. |
AffineModulation |
class | Feature-wise linear modulation (FiLM): y = γ(c) ⊙ h + β(c). |
ConcatConditioner |
class | Concatenate h and c, then apply one Linear. |
HyperLinear |
class | Generate a target Linear's (W, b) from c, then apply it. |
zero_readout |
function | Scale a readout's weight by scale and set its bias to bias. |
Helpers for packing (time, control) into FlowJax's single-condition API. (gauss_flows_maps._src.conditioning)¶
| Name | Kind | What it does |
|---|---|---|
pack_time_control |
function | Pack time and optional control vector into one condition array. |
time_control_cond_shape |
function | Return the FlowJax cond_shape for packed (time, control) inputs. |
unpack_time_control |
function | Unpack a packed (time, control) condition. |
Context-amortised affine modulation around any bijection (FiLM-style). (gauss_flows_maps._src.transforms.bijections.conditioner)¶
| Name | Kind | What it does |
|---|---|---|
Conditioner |
class | Wrap an unconditional bijection with a context-amortised affine modulation. |
gauss_flows_maps.monotone¶
Chandrupatla's bracketing root finder as an optimistix solver. (gauss_flows_maps._src.monotone.chandrupatla)¶
| Name | Kind | What it does |
|---|---|---|
Chandrupatla |
class | Chandrupatla's hybrid inverse-quadratic / bisection root finder. |
The bracketed inverse of an elementwise increasing function. (gauss_flows_maps._src.monotone.inverse)¶
| Name | Kind | What it does |
|---|---|---|
monotone_inverse |
function | Invert an elementwise increasing function by bracketed root finding. |
gauss_flows_maps.reparam¶
The contract of a reparametrisation x = g(u), and the paramax leaf it builds. (gauss_flows_maps._src.reparam._base)¶
| Name | Kind | What it does |
|---|---|---|
AbstractReparametrisation |
class | A bijection x = g(u) from an unconstrained u ∈ ℝᵐ onto a constrained set. |
Elementwise reparametrisations: exp, softplus and sigmoid, and their compositions. (gauss_flows_maps._src.reparam._elementwise)¶
| Name | Kind | What it does |
|---|---|---|
Composed |
class | The composition x = g₂(g₁(u)) of two elementwise maps. |
Reparametrised |
class | An elementwise map x = g(u) onto (a, ∞) or (a, b). |
Structured reparametrisations: a Cholesky factor and the weights of a simplex. (gauss_flows_maps._src.reparam._structured)¶
| Name | Kind | What it does |
|---|---|---|
CholeskyFactor |
class | A lower-triangular L with a positive diagonal, from u ∈ ℝ^(D(D+1)/2). |
Simplex |
class | Weights on the open simplex, w = softmax([u, 0]) from u ∈ ℝ^(K−1). |
gauss_flows_maps.sphere¶
| Name | Kind | What it does |
|---|---|---|
expmap_sphere |
function | Map a tangent vector at x to the sphere via the exponential map. |
logmap_sphere |
function | Return the tangent vector at x whose exp-map reaches y. |
tangent_basis |
function | Return an orthonormal basis of the tangent space Tₓ Sᵈ. |
gauss_flows_maps.surjections¶
Foundation types for SurVAE-style flows: surjections and stochastic transforms. (gauss_flows_maps._src.transforms.base)¶
| Name | Kind | What it does |
|---|---|---|
AbstractStochastic |
class | Base class for transforms that are stochastic in both directions. |
AbstractSurjection |
class | Base class for SurVAE surjective transforms. |
Stochastic uniform permutation along one axis (zero log-det). (gauss_flows_maps._src.transforms.stochastic.permutation)¶
| Name | Kind | What it does |
|---|---|---|
StochasticPermutation |
class | Uniform random permutation along one axis (zero log-det). |
Variational autoencoder as a SurVAE stochastic transform. (gauss_flows_maps._src.transforms.stochastic.vae)¶
| Name | Kind | What it does |
|---|---|---|
VAE |
class | Variational autoencoder as a SurVAE stochastic transform. |
Elementwise absolute-value surjection with a random-sign inverse. (gauss_flows_maps._src.transforms.surjections.abs)¶
| Name | Kind | What it does |
|---|---|---|
SimpleAbsSurjection |
class | Elementwise absolute-value surjection with a random-sign inverse. |
Generative surjection that appends conditionally sampled dimensions. (gauss_flows_maps._src.transforms.surjections.dimension.augment)¶
| Name | Kind | What it does |
|---|---|---|
Augment |
class | Generative surjection that appends conditionally sampled dimensions. |
Inference surjection that drops the trailing dimensions of a 1D event. (gauss_flows_maps._src.transforms.surjections.dimension.slice)¶
| Name | Kind | What it does |
|---|---|---|
Slice |
class | Inference surjection that drops the trailing dimensions of a 1D event. |
2D max-pooling surjection with a learned residual decoder. (gauss_flows_maps._src.transforms.surjections.pool)¶
| Name | Kind | What it does |
|---|---|---|
SimpleMaxPoolSurjection2d |
class | 2D max-pooling surjection with a learned residual decoder. |
Sort along one axis; invert via independent per-slice permutations. (gauss_flows_maps._src.transforms.surjections.sort)¶
| Name | Kind | What it does |
|---|---|---|
SimpleSortSurjection |
class | Sort along one axis; invert via independent per-slice permutations. |
gauss_flows_models.distributions¶
Class-conditional diagonal Gaussian base distribution. (gauss_flows_models._src.distributions.class_cond_diag_gaussian)¶
| Name | Kind | What it does |
|---|---|---|
ClassCondDiagGaussian |
class | Class-conditional diagonal Gaussian with learned per-class parameters. |
Diagonal Gaussian base distribution amortised by the shared affine modulation. (gauss_flows_models._src.distributions.conditional_diag_gaussian)¶
| Name | Kind | What it does |
|---|---|---|
ConditionalDiagGaussian |
class | Diagonal Gaussian whose location and scale are an affine modulation of noise. |
A flow base over gaussx's Gaussian Markov random fields. (gauss_flows_models._src.distributions.gmrf)¶
| Name | Kind | What it does |
|---|---|---|
GMRFBase |
class | A flow base over a gaussx Gaussian Markov random field. |
GaussianFieldLike |
class | What GMRFBase uses of a Gaussian field. |
Linear-Gaussian state-space model as a FlowJax distribution over a series. (gauss_flows_models._src.distributions.linear_gaussian_ssm)¶
| Name | Kind | What it does |
|---|---|---|
LinearGaussianSSM |
class | p(y_1:T) of a linear-Gaussian state-space model; event shape (T, M). |
The low-rank Gaussian base: probabilistic PCA and factor analysis. (gauss_flows_models._src.distributions.low_rank)¶
| Name | Kind | What it does |
|---|---|---|
LowRankGaussian |
class | 𝒩(μ, W Wᵀ + Ψ): probabilistic PCA (isotropic Ψ) or factor analysis (diagonal Ψ). |
Trainable Gaussian mixture base distribution. (gauss_flows_models._src.distributions.mixture)¶
| Name | Kind | What it does |
|---|---|---|
GaussianMixture |
class | Trainable multivariate Gaussian-mixture base distribution. |
The base of the Gaussians whose covariance is a lineax operator. (gauss_flows_models._src.distributions.operator_gaussian)¶
| Name | Kind | What it does |
|---|---|---|
AbstractOperatorGaussian |
class | 𝒩(μ, Σ) with Σ a lineax operator that the subclass builds. |
Distributions on the unit sphere S^d ⊂ ℝ^{d+1}. (gauss_flows_models._src.distributions.sphere)¶
| Name | Kind | What it does |
|---|---|---|
UniformOnSphere |
class | Uniform distribution on the unit sphere Sᵈ ⊂ ℝ^{d+1}. |
VonMisesFisher |
class | Von Mises–Fisher distribution on the unit sphere Sᵈ ⊂ ℝ^{d+1}. |
The structured Gaussian base: 𝒩(μ, Σ) for any lineax or gaussx covariance. (gauss_flows_models._src.distributions.structured)¶
| Name | Kind | What it does |
|---|---|---|
StructuredGaussian |
class | 𝒩(μ, Σ) for a structured covariance operator whose array leaves are trainable. |
gauss_flows_models.filters¶
Ensemble Kalman analysis performed in a Gaussianised latent space. (gauss_flows_models._src.flows.conjugate_filter)¶
| Name | Kind | What it does |
|---|---|---|
ConjugateTransformFilter |
class | Ensemble Kalman analysis performed in a Gaussianised latent space. |
rbig_conjugate_filter |
function | Fit a Gaussianising warp to a prior ensemble with RBIG. |
Normalizing Kalman Filter: a state-space base under a per-timestep warp. (gauss_flows_models._src.flows.kalman)¶
| Name | Kind | What it does |
|---|---|---|
normalizing_kalman_filter |
function | Compose a state-space base with a per-timestep observation warp. |
Run any Gaussian filter in warped coordinates. (gauss_flows_models._src.flows.transform_filter)¶
| Name | Kind | What it does |
|---|---|---|
TransformFilter |
class | Run a Gaussian filter in warped coordinates. |
gauss_flows_models.flows¶
FFJORD continuous normalizing flow bijection. (gauss_flows_models._src.continuous.ffjord)¶
| Name | Kind | What it does |
|---|---|---|
FFJORD |
class | Continuous normalizing flow via a learned ODE. |
Class-conditional flow convenience wrapper. (gauss_flows_models._src.flows.class_cond_flow)¶
| Name | Kind | What it does |
|---|---|---|
ClassCondFlow |
class | Class-conditional flow built on a ClassCondDiagGaussian base. |
RBIG-style Gaussianization flow constructors. (gauss_flows_models._src.flows.gaussianization)¶
| Name | Kind | What it does |
|---|---|---|
coupling_gaussianization_flow |
function | Construct a coupling-based Gaussianization flow. |
gaussianization_flow |
function | Construct a Gaussianization flow. |
Iterative RBIG (Rotation-Based Iterative Gaussianization) flow. (gauss_flows_models._src.flows.rbig)¶
| Name | Kind | What it does |
|---|---|---|
iterative_rbig |
function | Construct an iterative RBIG (Rotation-Based Iterative Gaussianization) flow. |
SurVAEFlow container: mixes FlowJax bijections with keyed surjections. (gauss_flows_models._src.flows.survae)¶
| Name | Kind | What it does |
|---|---|---|
SurVAEFlow |
class | Container that threads PRNG keys through a mixed bijection / surjection chain. |
Vector-field networks for continuous normalizing flows. (gauss_flows_models._src.nn.diffeq_nets)¶
| Name | Kind | What it does |
|---|---|---|
DiffeqConcat |
class | MLP vector field with a learnable scalar time embedding. |
DiffeqMLP |
class | MLP vector field f(ode_time, x, condition) via concatenation. |
gauss_flows_models.inference¶
Fitting a flow to samples by maximum likelihood. (gauss_flows_models._src.inference.train)¶
| Name | Kind | What it does |
|---|---|---|
fit_gaussianization_flow |
function | Fit a flow to samples by maximum likelihood, with early stopping. |
negative_log_likelihood |
function | Mean negative log-likelihood of a batch under a flow. |
Iterative-Gaussianization (RBIG) warm-start builders. (gauss_flows_models._src.init.rbig)¶
| Name | Kind | What it does |
|---|---|---|
fit_rbig |
function | Fit an iterative-Gaussianization (RBIG) flow to data in closed form. |
fit_rbig_coupling |
function | Warm-start an RBIG-style coupling flow in closed form. |
gauss_flows_models.info_theory¶
| Name | Kind | What it does |
|---|---|---|
entropy |
function | Differential entropy of a flow (flow-based Monte-Carlo estimator). |
entropy_reduction |
function | Differential entropy of x via a Gaussianization flow (RBIG-way). |
gaussian_entropy |
function | Differential entropy of a Gaussian (analytical Gaussian closed form). |
gaussian_kl_divergence |
function | KL divergence of two Gaussians (analytical Gaussian closed form). |
gaussian_mutual_information |
function | Mutual information of Gaussian blocks (analytical Gaussian closed form). |
gaussian_total_correlation |
function | Total correlation of a Gaussian (analytical Gaussian closed form). |
information_reduction |
function | Total correlation removed between two representations (RBIG-way reduction). |
kl_divergence |
function | KL divergence KL(P ‖ Q) of flows (flow-based Monte-Carlo estimator). |
kl_divergence_reduction |
function | KL divergence KL(P \|\| Q) via a reference Gaussianization (RBIG-way). |
mutual_information |
function | Mutual information I(X; Y) of flows (flow-based Monte-Carlo estimator). |
negentropy |
function | Negentropy of a flow (flow-based Monte-Carlo estimator). |
total_correlation |
function | Total correlation of a flow (flow-based Monte-Carlo estimator). |
total_correlation_reduction |
function | Total correlation of x via a Gaussianization flow (RBIG-way). |
Listed at flowjax 19.1.0, equinox 0.13.8, paramax 0.0.5, functax 0.0.15, optimistix 0.1.0, diffrax 0.7.2.
Upstream: flowjax¶
the bijection and distribution base classes every gauss_flows layer subclasses, the stock bijections (Affine, Chain, Coupling, RationalQuadraticSpline, ...), the flow factories and the training loops
flowjax.bijections¶
| Name | Kind | What it does |
|---|---|---|
AbstractBijection |
class | Bijection abstract class. |
AdditiveCondition |
class | Given a callable f, carries out the transformation y = x + f(condition). |
Affine |
class | Elementwise affine transformation :math:y = a \cdot x + b. |
BlockAutoregressiveNetwork |
class | Block Autoregressive Network (https://arxiv.org/abs/1904.04676). |
Chain |
class | Compose arbitrary bijections to form another bijection. |
Concatenate |
class | Concatenate bijections along an existing axis, similar to jnp.concatenate. |
Coupling |
class | Coupling layer implementation (https://arxiv.org/abs/1605.08803). |
DiscreteCosine |
class | Discrete Cosine Transform (DCT) bijection. |
EmbedCondition |
class | Wrap a bijection to include an embedding network. |
Exp |
class | Elementwise exponential transform (forward) and log transform (inverse). |
Flip |
class | Flip the input array. |
Householder |
class | A Householder reflection. |
Identity |
class | The identity bijection. |
Indexed |
class | Applies bijection to specific indices of an input. |
Invert |
class | Invert a bijection. |
LeakyTanh |
class | Tanh bijection, with a linear transformation beyond +/- max_val. |
Loc |
class | Location transformation :math:y = a \cdot x + b. |
MaskedAutoregressive |
class | Masked autoregressive bijection. |
NumericalInverse |
class | Bijection wrapper to provide inverse methods using e.g. root finding. |
Permute |
class | Permutation transformation. |
Planar |
class | Planar bijection as used by https://arxiv.org/pdf/1505.05770.pdf. |
Power |
class | Power transform :math:y = x^p. |
RationalQuadraticSpline |
class | Scalar RationalQuadraticSpline transformation (https://arxiv.org/abs/1906.04032). |
Reshape |
class | Wraps bijection methods with reshaping operations. |
Sandwich |
class | Composes bijections in a nested structure: :math:g^{-1} \circ f \circ g. |
Scale |
class | Scale transformation :math:y = a \cdot x. |
Scan |
class | Repeatedly apply the same bijection with different parameter values. |
Sigmoid |
class | Sigmoid bijection :math:y = \sigma(x) = \frac{1}{1 + \exp(-x)}. |
SoftPlus |
class | Transforms to positive domain using softplus :math:y = \log(1 + \exp(x)). |
Stack |
class | Stack bijections along a new axis (analagous to jnp.stack). |
Tanh |
class | Tanh bijection :math:y=\tanh(x). |
TriangularAffine |
class | A triangular affine transformation. |
Vmap |
class | Applies vmap to bijection methods to add a batch dimension to the bijection. |
flowjax.distributions¶
| Name | Kind | What it does |
|---|---|---|
AbstractBijection |
class | Bijection abstract class. |
AbstractDistribution |
class | Abstract distribution class. |
AbstractLocScaleDistribution |
class | Abstract distribution class for affine transformed distributions. |
AbstractTransformed |
class | Abstract class respresenting transformed distributions. |
AbstractUnwrappable |
class | Re-exported from paramax. |
AbstractVar |
class | Re-exported from equinox. |
Affine |
class | Elementwise affine transformation :math:y = a \cdot x + b. |
Array |
class | Re-exported from jax. |
ArrayLike |
constant | Re-exported from types. |
Beta |
class | Beta distribution. |
Callable |
class | Re-exported from collections. |
Cauchy |
class | Cauchy distribution. |
Chain |
class | Compose arbitrary bijections to form another bijection. |
ClassVar |
function | Re-exported from typing. |
Exp |
class | Elementwise exponential transform (forward) and log transform (inverse). |
Exponential |
class | Exponential distribution. |
Gamma |
class | Gamma distribution. |
Gumbel |
class | Gumbel distribution. |
Laplace |
class | Laplace distribution. |
LogNormal |
class | Log normal distribution. |
Logistic |
class | Logistic distribution. |
MultivariateNormal |
class | Multivariate normal distribution. |
Normal |
class | An independent Normal distribution with mean and std for each dimension. |
PRNGKeyArray |
function | Re-exported from typing. |
Parameterize |
class | Re-exported from paramax. |
Scale |
class | Scale transformation :math:y = a \cdot x. |
Shaped |
class | Re-exported from jaxtyping. |
StandardNormal |
class | Standard normal distribution. |
StudentT |
class | Student T distribution. |
Transformed |
class | Form a distribution like object using a base distribution and a bijection. |
TriangularAffine |
class | A triangular affine transformation. |
Uniform |
class | Uniform distribution. |
VmapMixture |
class | Create a mixture distribution. |
abstractmethod |
function | Re-exported from abc. |
arraylike_to_array |
function | Check the input is arraylike and convert to a JAX Array with jnp.asarray. |
inv_softplus |
function | Re-exported from paramax. |
log_softmax |
function | Re-exported from jax. |
logsumexp |
function | Re-exported from jax. |
merge_cond_shapes |
function | Merges shapes (tuples of ints or None) used in bijections and distributions. |
non_trainable |
function | Re-exported from paramax. |
prod |
function | Re-exported from math. |
softplus |
function | Re-exported from jax. |
tree_map |
function | Re-exported from jax. |
unwrap |
function | Re-exported from paramax. |
wraps |
function | Re-exported from functools. |
flowjax.flows¶
| Name | Kind | What it does |
|---|---|---|
AbstractBijection |
class | Bijection abstract class. |
AbstractDistribution |
class | Abstract distribution class. |
AdditiveCondition |
class | Given a callable f, carries out the transformation y = x + f(condition). |
Affine |
class | Elementwise affine transformation :math:y = a \cdot x + b. |
Array |
class | Re-exported from jax. |
BlockAutoregressiveNetwork |
class | Block Autoregressive Network (https://arxiv.org/abs/1904.04676). |
Callable |
class | Re-exported from collections. |
Chain |
class | Compose arbitrary bijections to form another bijection. |
Coupling |
class | Coupling layer implementation (https://arxiv.org/abs/1605.08803). |
Flip |
class | Flip the input array. |
Invert |
class | Invert a bijection. |
LeakyTanh |
class | Tanh bijection, with a linear transformation beyond +/- max_val. |
Linear |
class | Re-exported from equinox. |
MaskedAutoregressive |
class | Masked autoregressive bijection. |
NumericalInverse |
class | Bijection wrapper to provide inverse methods using e.g. root finding. |
PRNGKeyArray |
function | Re-exported from typing. |
Parameterize |
class | Re-exported from paramax. |
Permute |
class | Permutation transformation. |
Planar |
class | Planar bijection as used by https://arxiv.org/pdf/1505.05770.pdf. |
RationalQuadraticSpline |
class | Scalar RationalQuadraticSpline transformation (https://arxiv.org/abs/1906.04032). |
Sandwich |
class | Composes bijections in a nested structure: :math:g^{-1} \circ f \circ g. |
Scan |
class | Repeatedly apply the same bijection with different parameter values. |
Transformed |
class | Form a distribution like object using a base distribution and a bijection. |
TriangularAffine |
class | A triangular affine transformation. |
Vmap |
class | Applies vmap to bijection methods to add a batch dimension to the bijection. |
WeightNormalization |
class | Re-exported from paramax. |
bisect_check_expand_search |
function | Bisect check expand search for an increasing autoregressive function. |
block_neural_autoregressive_flow |
function | Block neural autoregressive flow (BNAF) (https://arxiv.org/abs/1904.04676). |
coupling_flow |
function | Create a coupling flow (https://arxiv.org/abs/1605.08803). |
glorot_uniform |
function | Re-exported from jax. |
inv_softplus |
function | Re-exported from paramax. |
masked_autoregressive_flow |
function | Masked autoregressive flow. |
partial |
class | Re-exported from functools. |
planar_flow |
function | Planar flow as introduced in https://arxiv.org/pdf/1505.05770.pdf. |
root_finder_to_inverter |
function | Utility to convert root finder to an "inverter". |
softplus |
function | Re-exported from jax. |
triangular_spline_flow |
function | Triangular spline flow. |
flowjax.train¶
| Name | Kind | What it does |
|---|---|---|
fit_to_data |
function | Train a PyTree (e.g. a distribution) to samples from the target. |
fit_to_key_based_loss |
function | Train a pytree, using a loss with params, static and key as arguments. |
step |
function | Carry out a training step. |
Upstream: equinox¶
modules as pytrees, filtered transformations and static fields
equinox¶
| Name | Kind | What it does |
|---|---|---|
AbstractClassVar |
class | Used to mark an abstract class attribute, along with its type. |
AbstractVar |
class | Used to mark an abstract instance attribute, along with its type. |
Enumeration |
class | JAX-compatible enums. |
EquinoxRuntimeError |
class | Re-exported from builtins. |
EquinoxTracetimeError |
class | Unspecified run-time error. |
Module |
class | Base class. |
Partial |
class | Like functools.partial, but treats the wrapped function, and partially-applied args and kwargs, as a PyTree. |
StrictConfig |
function | |
apply_updates |
function | A jax.tree_util.tree_map-broadcasted version of python if update is None: return model else: return model + update |
branched_error_if |
function | As equinox.error_if, but will raise one of several msgs depending on the value of index. |
clear_caches |
function | Clears internal Equinox caches. |
combine |
function | Combines multiple PyTrees into one PyTree, by replacing None leaves. |
default_deserialise_filter_spec |
function | Default filter specification for deserialising saved data. |
default_serialise_filter_spec |
function | Default filter specification for serialising a leaf. |
error_if |
function | Throws an error based on runtime values. |
field |
function | Equinox supports extra functionality on top of the default dataclasses. |
filter |
function | Filters out the leaves of a PyTree not satisfying a condition. |
filter_checkpoint |
function | Filtered version of jax.checkpoint. |
filter_closure_convert |
function | As jax.closure_convert, but works on functions accepting and returning arbitrary PyTree objects. |
filter_custom_jvp |
class | Filtered version of jax.custom_jvp. |
filter_custom_vjp |
class | As jax.custom_vjp, but with a nicer interface. |
filter_eval_shape |
function | As jax.eval_shape, but allows any Python object as inputs and outputs. |
filter_grad |
function | Creates a function that computes the gradient of fun. |
filter_hessian |
function | Computes the Hessian of fun. |
filter_jacfwd |
function | Computes the Jacobian of fun, evaluated using forward-mode AD. |
filter_jacrev |
function | Computes the Jacobian of fun, evaluated using reverse-mode AD. |
filter_jit |
function | An easier-to-use version of jax.jit. |
filter_jvp |
function | Like jax.jvp, but accepts arbitrary PyTrees. (Not just JAXable types.) |
filter_make_jaxpr |
function | As jax.make_jaxpr, but accepts arbitrary PyTrees as input and output. |
filter_pmap |
function | !!! warning |
filter_pure_callback |
function | Calls a Python function inside a JIT region. |
filter_shard |
function | Filtered transform combining jax.lax.with_sharding_constraint and jax.device_put. |
filter_value_and_grad |
function | Creates a function that evaluates both fun and the gradient of fun. |
filter_vjp |
function | Like jax.vjp, but accepts arbitrary PyTrees. (Not just JAXable types.) |
filter_vmap |
function | Vectorises a function. |
if_array |
class | Returns a callable that returns the specified integer if evaluated on an array. |
is_array |
function | Returns True if element is a JAX array or NumPy array. |
is_array_like |
function | Returns True if element is a JAX array, a NumPy array, or a Python float/complex/bool/int. |
is_inexact_array |
function | Returns True if element is an inexact (i.e. floating or complex) JAX/NumPy array. |
is_inexact_array_like |
function | Returns True if element is an inexact JAX array, an inexact NumPy array, or a Python float or complex. |
module_update_wrapper |
function | Like functools.update_wrapper (or its better-known cousin, functools.wraps), but acts on equinox.Modules, and does not modify its input (it returns the... |
partition |
function | Splits a PyTree into two pieces. |
static_field |
function | |
tree_at |
function | Modifies a leaf or subtree of a PyTree. (A bit like using .at[].set() on a JAX array.) |
tree_check |
function | Checks if the PyTree has no self-references, and if all non-leaf nodes are unique Python objects. (For example something like x = [1]; y = [x, x] would fai... |
tree_deserialise_leaves |
function | Load the leaves of a PyTree from a file. |
tree_equal |
function | Returns True if all input PyTrees are equal. |
tree_flatten_one_level |
function | Returns the immediate subnodes of a PyTree node. |
tree_inference |
function | Convenience function for setting all inference attributes. |
tree_pformat |
function | Pretty-formats a PyTree as a string, whilst abbreviating JAX arrays. |
tree_pprint |
function | Pretty-prints a PyTree as a string, whilst abbreviating JAX arrays. |
tree_serialise_leaves |
function | Save the leaves of a PyTree to file. |
Upstream: paramax¶
parameterizations and constraints (Parameterize, NonTrainable, unwrap)
paramax¶
| Name | Kind | What it does |
|---|---|---|
AbstractUnwrappable |
class | An abstract class representing an unwrappable object. |
NonTrainable |
class | Applies stop gradient to all arraylike leaves before unwrapping. |
Parameterize |
class | Unwrap an object by calling fn with args and kwargs. |
RealToIncreasingOnInterval |
class | Map an unconstrained vector to increasing points on a fixed interval. |
WeightNormalization |
class | Applies weight normalization (https://arxiv.org/abs/1602.07868). |
contains_unwrappables |
function | Check if a pytree contains unwrappables. |
non_trainable |
function | Freezes parameters by wrapping inexact array leaves with :class:NonTrainable. |
unwrap |
function | Map across a PyTree and unwrap all :class:AbstractUnwrappable nodes. |
Upstream: functax¶
1-D interpolants and axes, used by HistogramCDF
functax.interp¶
| Name | Kind | What it does |
|---|---|---|
Akima |
class | Akima's local cubic, as SciPy's Akima1DInterpolator(method="akima"). |
BSpline |
class | A B-spline of order k on every axis: (k + 1)ᴰ taps, after the prefilter. |
BSplineBasis |
class | The centred B-spline of order k (degree k): k + 1 taps per axis. |
BandedPrefilter |
class | c = B⁻¹ y per axis: the B-spline prefilter, separable on a grid. |
Basis |
class | A local basis on one axis: S relative taps, and weights from the offsets. |
Binning |
class | Aggregate scattered samples into grid cells: Hᵀ y, normalised for the mean. |
BinningPlan |
class | A plan from N samples to M cells: the sums, means or counts per cell. |
BrownianBridge |
class | The Brownian bridge between the knots of one axis, cell by cell. |
Chebyshev |
class | The Chebyshev series of samples on Chebyshev nodes, read at arbitrary points. |
ChebyshevFit |
class | c = Π C y: the first D_c Chebyshev coefficients of samples on Chebyshev nodes. |
ChebyshevInterpolant |
class | A fitted Chebyshev series f̂(x) = ∑ₖ cₖ Tₖ(ξ(x)), read at targets by clenshaw. |
ComposedPlan |
class | outer @ inner: H_outer H_inner 𝒮_inner, one plan with the product stencil. |
Conservative |
class | First-order conservative remapping: each target cell's area-weighted mean. |
Cubic |
class | Keys cubic convolution on every axis: 4ᴰ taps per target, no prefilter. |
CubicBasis |
class | Keys cubic convolution: taps i − 1 … i + 2, weights W(1 + t) … W(2 − t). |
CubicSpline |
class | The interpolating C² cubic spline, as scipy.interpolate.CubicSpline. |
Delaunay |
class | Linear interpolation on a triangulation of the sources: D + 1 taps per target. |
DerivativePlan |
class | A plan whose read-out holds basis derivatives: ∂ᵐf̂/∂x_dᵐ at the targets. |
Fit |
class | c = 𝒮(y), applied once per field before the read-out. |
Fourier |
class | Band-limited Fourier resampling from N to M nodes of one periodic axis. |
FourierReadout |
class | H y = (M/N) Re(F_M⁻¹ S F_N y), band-limited resampling by two FFTs. |
GaussianPlan |
class | A plan read as a Gaussian posterior: f(X_) ∣ y ~ 𝒩(H 𝒮(y), Σ_{∣y}). |
HermiteFit |
class | [y; d] from y: the values in increasing-knot order and their slopes. |
HermiteGeometry |
class | What a 1-D series plan's Hermite read-out was built from. |
Identity |
class | The fit of every local scheme: c = y. |
Interpolant |
class | A fitted field f̂(x) = ∑ₛ wₛ(t(x)) c_{iₛ(x)}, read at any targets. |
InverseDistance |
class | Inverse-distance weighting of the Q nearest scattered sources. |
Kernel |
class | k(x, x′): the (M, N) cross-kernel of M targets and N sources. |
KernelCovariance |
class | Σ_{∣y} = K_* − H A⁻¹ Hᵀ, the posterior covariance of a kernel fit. |
KernelReadout |
class | The dense read-out of a kernel scheme: f̂(X_) = K_X c + P_* b. |
KernelSolve |
class | [c; b] = A⁻¹ [y; 0], the saddle-point system of a kernel and a tail. |
Kriging |
class | Kriging: the best linear unbiased predictor under a covariance k and a drift. |
Linear |
class | Linear on every axis: 2ᴰ taps per target, weights ∏_d (1 − t_d or t_d). |
LinearBasis |
class | Linear: taps i and i + 1, with weights 1 − t and t. |
LocalGeometry |
class | What a local plan was built from: the source, the target coordinates, the bases. |
LocalScheme |
class | A scheme with one local basis per axis and the identity fit. |
Nearest |
class | Nearest neighbour on every axis: one tap per target, weight 1. |
NearestBasis |
class | Nearest neighbour: one tap, the closer of i and i + 1, with weight 1. |
NonlinearDerivativePlan |
class | ∂ᵐf̂/∂xᵐ of a nonlinear series plan: it reads, but has no fixed operator. |
NonlinearPlan |
class | A plan whose fit depends on y: no fixed operator or adjoint, but linearize. |
Pchip |
class | Monotone piecewise cubic Hermite (Fritsch-Carlson), as SciPy's PCHIP. |
Plan |
class | f̂(X_*) = H 𝒮(y), fitted once, applied to many fields. |
Policies |
class | Outside the domain, at missing samples, and at the edges. |
Polyharmonic |
class | The polyharmonic spline φ(r) = ±rᵖ for odd p, ±rᵖ log r for even p. |
PosteriorCovariance |
class | Σ_{*∣y}, the (M, M) posterior covariance of the field at M targets. |
RBF |
class | Radial basis function interpolation: f̂(x) = ∑ⱼ cⱼ k(x, xⱼ) + ∑ₚ bₚ pₚ(x). |
RadialKernel |
class | k(x, x′) = φ(‖x − x′‖), Euclidean in the coordinates as given. |
ReadGeometry |
class | What a plan's stencil was built from, so Plan.derivative can rebuild it. |
Readout |
class | c ↦ f̂(X_*): the read-out of a plan, from coefficients to target values. |
Scheme |
class | An interpolation scheme: configuration, frozen into a Plan by plan. |
SeriesInterpolant |
class | A 1-D series field f̂ read at targets chosen inside the trace. |
SeriesScheme |
class | A scheme on one axis with a cubic Hermite read-out and its own slopes. |
Steffen |
class | Steffen's monotone cubic: no overshoot between knots, by construction. |
Stencil |
class | A sparse read-out H: row k reads S source values at flat indices. |
Tensor |
class | One local scheme per source axis, as one tensor stencil. |
TransposedStencil |
class | f̂ = diag(w) Hᵀ y: a sampling stencil H used backwards, scaled per cell. |
Wendland |
class | The compact Wendland kernel φ(r) = ψ(r/ρ), zero for r ≥ ρ. |
WindowedPlan |
class | plan[window]: the rows of a grid target inside a window, sources unchanged. |
bspline |
function | The centred B-spline βᵏ of degree k at x. |
check_outside |
function | Enforce outside="raise" on the host; no-op for every other policy. |
clenshaw |
function | The Chebyshev series f(x) = ∑ₖ cₖ Tₖ(ξ(x)) by Clenshaw's recurrence. |
compose |
function | H = H_outer H_inner: apply inner first, then outer, as one stencil. |
index_positions |
function | The fractional index position u of each target, so node j sits at u = j. |
locate |
function | The cell index i, the offset t ∈ [0, 1) and the inside flag of each target. |
locate_curvilinear |
function | The cell (i, j), the offset (s, t) and the inside flag of targets on a swath. |
overlap_weights_1d |
function | The (M, N) overlap lengths |cⱼ ∩ Cᵢ| of every target and source cell. |
plan_key |
function | sha256 hex of the scheme, the policies and both geometries' bytes. |
remap_taps |
function | Bring tap indices back onto [0, N − 1] by a boundary rule. |
spline_poles |
function | The poles zₚ of the order-k B-spline prefilter, as in scipy.ndimage. |
tensor_stencil |
function | H = H₁ ⊗ … ⊗ H_D: one local basis per source axis, read at the targets. |
functax.geometry¶
| Name | Kind | What it does |
|---|---|---|
AffineGrid |
class | A regular 2-D grid given by an affine transform and a shape. |
Axis |
class | One strictly monotone coordinate axis, optionally periodic or in time. |
CurvilinearGrid |
class | A 2-D grid whose node coordinates are given per node, such as a swath. |
Metric |
type alias | Alias of typing.Literal['euclidean', 'chord', 'geodesic']. |
Points |
class | Scattered sites, with the metric their distances use. |
RectilinearGrid |
class | A tensor-product grid with one Axis per dimension. |
cartesian_to_tangent |
function | 3-D vectors w to their east and north components (w · e_east, w · e_north). |
chebyshev_nodes |
function | The Chebyshev nodes of degree N on [a, b], from b down to a. |
chord_distance |
function | The straight-line distance through the sphere between every pair. |
ecef_to_lonlat |
function | Earth-centred, Earth-fixed coordinates to geodetic (λ, φ) and height. |
enu_basis |
function | The local east, north and up unit vectors at each point. |
fibonacci_sphere |
function | The Fibonacci lattice: n near-uniform points on the unit sphere. |
from_pixel |
function | Map fractional pixel (row, col) to coordinates (x, y): the inverse of to_pixel. |
gauss_legendre_grid |
function | The Gauss–Legendre grid on the sphere, with its quadrature weights. |
geodesic_distance |
function | The great-circle distance between every pair. |
healpix_grid |
function | HEALPix pixel centres, each weighted by the equal pixel area. |
icosphere |
function | The subdivided icosahedron, a quasi-uniform triangle mesh of the sphere. |
latlon_grid |
function | The regular cell-centred lon/lat grid, weighted by exact cell areas. |
local_tangent_plane |
function | Project points onto the tangent plane at origin, as (east, north). |
lonlat_to_ecef |
function | Geodetic (λ, φ) and height to Earth-centred, Earth-fixed coordinates. |
lonlat_to_unit |
function | Lift longitude and latitude onto the unit sphere. |
mesh_vertex_areas |
function | The lumped (barycentric) vertex areas of a triangle mesh. |
pairwise_distance |
function | The distance from every source to every target, in their shared metric. |
pixel_centres |
function | The x and y of every pixel centre of a grid, each of shape (rows, cols). |
rotation_to_pole |
function | The rotation Q with Q e_up(centre) = (0, 0, 1). |
slice_transform |
function | The transform of the slice [row0::row_step, col0::col_step] of a raster. |
spherical_polygon_area |
function | The signed area of a spherical polygon with great-circle edges. |
tangent_to_cartesian |
function | East and north components (u, v) to the tangent vector u e_east + v e_north. |
to_pixel |
function | Map coordinates (x, y) to fractional pixel (row, col), centres at integers. |
unit_to_lonlat |
function | Longitude and latitude of vectors on (or off) the unit sphere. |
window |
function | The row and column slices of the pixels that cover bounds. |
Upstream: optimistix¶
root finders and minimisers; bisection inverts the mixture-CDF and deep-sigmoid couplings
optimistix¶
| Name | Kind | What it does |
|---|---|---|
AbstractAdjoint |
class | The abstract base class of all adjoints. |
AbstractBFGS |
class | Abstract version of the BFGS (Broyden–Fletcher–Goldfarb–Shanno) minimisation algorithm. |
AbstractDFP |
class | Abstract version of the DFP (Davidon–Fletcher–Powell) minimisation algorithm. |
AbstractDescent |
class | The abstract base class for descents. |
AbstractFixedPointSolver |
class | Abstract base class for all fixed point solvers. |
AbstractGaussNewton |
class | Abstract base class for all Gauss-Newton type methods. |
AbstractGradientDescent |
class | The gradient descent method for unconstrained minimisation. |
AbstractIterativeSolver |
class | Abstract base class for all iterative solvers. |
AbstractLBFGS |
class | Abstract version of the L-BFGS (limited memory Broyden–Fletcher–Goldfarb–Shanno) solver. |
AbstractLeastSquaresSolver |
class | Abstract base class for all least squares solvers. |
AbstractMinimiser |
class | Abstract base class for all minimisers. |
AbstractQuasiNewton |
class | Abstract quasi-Newton minimisation algorithm. |
AbstractRootFinder |
class | Abstract base class for all root finders. |
AbstractSearch |
class | The abstract base class for all searches. (Which are our generalisation of line searches, trust regions, and learning rates.) |
BFGS |
class | BFGS (Broyden–Fletcher–Goldfarb–Shanno) minimisation algorithm. |
BacktrackingArmijo |
class | Perform a backtracking Armijo line search. |
BestSoFarFixedPoint |
class | Wraps another fixed-point solver, to return the best-so-far value. |
BestSoFarLeastSquares |
class | Wraps another least-squares solver, to return the best-so-far value. |
BestSoFarMinimiser |
class | Wraps another minimiser, to return the best-so-far value. |
BestSoFarRootFinder |
class | Wraps another root-finder, to return the best-so-far value. |
Bisection |
class | The bisection method of root finding. |
Chord |
class | The Chord method of root finding. |
ClassicalTrustRegion |
class | The classic trust-region update algorithm which uses a quadratic approximation of the objective function to predict reduction. |
DFP |
class | DFP (Davidon–Fletcher–Powell) minimisation algorithm. |
DampedNewtonDescent |
class | The damped Newton (Levenberg--Marquardt) descent. |
Dogleg |
class | Dogleg algorithm. |
DoglegDescent |
class | The Dogleg descent step, which switches between the Cauchy and the Newton descent directions. |
FixedPointIteration |
class | Repeatedly calls a function in search of a fixed point. |
FunctionInfo |
class | Different solvers (BFGS, Levenberg--Marquardt, ...) evaluate different quantities of the objective function. |
GaussNewton |
class | Gauss-Newton algorithm, for solving nonlinear least-squares problems. |
GoldenSearch |
class | Golden-section search for finding the minimum of a univariate function in a given interval. |
GradientDescent |
class | Classic gradient descent with a learning rate learning_rate. |
ImplicitAdjoint |
class | Backpropagate via the implicit function theorem. |
IndirectDampedNewtonDescent |
class | The indirect damped Newton (Levenberg--Marquardt) trust-region descent. |
IndirectLevenbergMarquardt |
class | The Levenberg--Marquardt method as a true trust-region method. |
LBFGS |
class | L-BFGS (Limited-memory Broyden–Fletcher–Goldfarb–Shanno) minimisation algorithm. |
LearningRate |
class | Move downhill by taking a step of the fixed size learning_rate. |
LevenbergMarquardt |
class | The Levenberg--Marquardt method. |
LinearTrustRegion |
class | The trust-region update algorithm which uses a linear approximation of the objective function to predict reduction. |
NelderMead |
class | The Nelder-Mead minimisation algorithm. (Downhill simplex derivative-free method.) |
Newton |
class | Newton's method for root finding. |
NewtonDescent |
class | Newton descent direction. |
NonlinearCG |
class | The nonlinear conjugate gradient method. |
NonlinearCGDescent |
class | The nonlinear conjugate gradient step. |
OptaxMinimiser |
class | A wrapper to use Optax first-order gradient-based optimisers with optimistix.minimise. |
RESULTS |
class | An enumeration, with the following entries: |
RecursiveCheckpointAdjoint |
class | Backpropagate by differentiating through the iterates directly. |
Solution |
class | The solution to a nonlinear solve. |
SteepestDescent |
class | The descent direction given by locally following the gradient. |
dai_yuan |
function | The Dai--Yuan formula for β. |
fixed_point |
function | Find a fixed-point of a function. |
fletcher_reeves |
function | The Fletcher--Reeves formula for β. |
hestenes_stiefel |
function | The Hestenes--Stiefel formula for β. |
least_squares |
function | Solve a nonlinear least-squares problem. |
max_norm |
function | Compute the L-infinity norm of a PyTree of arrays. |
minimise |
function | Minimise a function. |
polak_ribiere |
function | The Polak--Ribière formula for β. |
rms_norm |
function | Compute the RMS (root-mean-squared) norm of a PyTree of arrays. |
root_find |
function | Solve a root-finding problem. |
two_norm |
function | Computes the L2 norm of a PyTree of arrays. |
Upstream: diffrax¶
ODE solvers, used by FFJORD
diffrax¶
| Name | Kind | What it does |
|---|---|---|
ALIGN |
class | The Adaptive Langevin via Interpolated Gradients and Noise method designed by James Foster. |
AbstractAdaptiveSolver |
class | Indicates that this solver provides error estimates, and that as such it may be used with an adaptive step size controller. |
AbstractAdaptiveStepSizeController |
class | Indicates an adaptive step size controller. |
AbstractAdjoint |
class | Abstract base class for all adjoint methods. |
AbstractBrownianIncrement |
class | Abstract base class for all Brownian increments. |
AbstractBrownianPath |
class | Abstract base class for all Brownian paths. |
AbstractDIRK |
class | Abstract base class for all Diagonal Implicit Runge--Kutta solvers. |
AbstractDiscreteTerminatingEvent |
class | AbstractDiscreteTerminatingEvent() |
AbstractERK |
class | Abstract base class for all Explicit Runge--Kutta solvers. |
AbstractESDIRK |
class | Abstract base class for all Explicit Singular Diagonal Implicit Runge--Kutta solvers. |
AbstractFosterLangevinSRK |
class | Abstract class for Stochastic Runge Kutta methods specifically designed for Underdamped Langevin Diffusion of the form |
AbstractGlobalInterpolation |
class | AbstractGlobalInterpolation() |
AbstractImplicitSolver |
class | Indicates that this is an implicit differential equation solver. |
AbstractItoSolver |
class | Indicates that when used as an SDE solver that this solver will converge to the Itô solution. |
AbstractLocalInterpolation |
class | AbstractLocalInterpolation() |
AbstractPath |
class | Abstract base class for all paths. |
AbstractProgressMeter |
class | Progress meters used to indicate how far along a solve is. |
AbstractRungeKutta |
class | Abstract base class for all Runge--Kutta solvers. (Other than fully-implicit Runge--Kutta methods, which have a different computational structure.) |
AbstractSDIRK |
class | Abstract base class for all Singular Diagonal Implict Runge--Kutta solvers. |
AbstractSRK |
class | A general Stochastic Runge-Kutta method. |
AbstractSolver |
class | Abstract base class for all differential equation solvers. |
AbstractSpaceTimeLevyArea |
class | Abstract base class for all Space Time Levy Areas. |
AbstractSpaceTimeTimeLevyArea |
class | Abstract base class for all Space Time Time Levy Areas. |
AbstractStepSizeController |
class | Abstract base class for all step size controllers. |
AbstractStratonovichSolver |
class | Indicates that when used as an SDE solver that this solver will converge to the Stratonovich solution. |
AbstractTerm |
class | Abstract base class for all terms. |
AbstractWrappedSolver |
class | Wraps another solver "transparently", in the sense that all isinstance checks will be forwarded on to the wrapped solver, e.g. when testing whether the sol... |
BacksolveAdjoint |
class | Backpropagate through diffrax.diffeqsolve by solving the continuous adjoint equations backwards-in-time. |
Bosh3 |
class | Bogacki--Shampine's 3/2 method. |
BrownianIncrement |
class | Pytree containing the dt time increment and W the Brownian motion. |
ButcherTableau |
class | The Butcher tableau for an explicit or diagonal Runge--Kutta method. |
CalculateJacobian |
class | An enumeration of possible ways a Runga--Kutta method may wish to calculate a Jacobian. |
ClipStepSizeController |
class | Wraps an existing step controller with three pieces of functionality: |
ConstantStepSize |
class | Use a constant step size, equal to the dt0 argument of diffrax.diffeqsolve. |
ControlTerm |
class | A term representing the general case of \(f(t, y(t), args) \mathrm{d}x(t)\), in which the vector field (\(f\)) - control (\(\mathrm{d}x\)) interaction is a matrix-... |
CubicInterpolation |
class | Piecewise cubic spline interpolation over the interval \([t_0, t_1]\). |
DenseInterpolation |
class | DenseInterpolation(ts: jaxtyping.Real[Array, 'times'], ts_size: Union[jaxtyping.Int[Array, ''], jaxtyping.Int[ndarray, ''], numpy.number, int], infos: dict[s... |
DirectAdjoint |
class | A variant of diffrax.RecursiveCheckpointAdjoint that is also able to support forward-mode autodifferentiation, whilst being less computationally efficient.... |
DiscreteTerminatingEvent |
class | DiscreteTerminatingEvent(cond_fn: collections.abc.Callable[..., typing.Union[jaxtyping.Bool[Array, ''], jaxtyping.Bool[ndarray, ''], numpy.bool, numpy.number... |
Dopri5 |
class | Dormand-Prince's 5/4 method. |
Dopri8 |
class | Dormand--Prince's 8/7 method. |
Euler |
class | Euler's method. |
EulerHeun |
class | Euler-Heun method. |
Event |
class | Can be used to terminate the solve early if a condition, or one of multiple conditions, is triggered. |
ForwardMode |
class | Enables support for forward-mode automatic differentiation (like jax.jvp or jax.jacfwd) through diffrax.diffeqsolve. (As such this shouldn't really be... |
FourthOrderPolynomialInterpolation |
class | FourthOrderPolynomialInterpolation(*, t0: Union[jaxtyping.Real[Array, ''], jaxtyping.Real[ndarray, ''], numpy.number, int, float], t1: Union[jaxtyping.Real[A... |
GeneralShARK |
class | ShARK method for Stratonovich SDEs. |
HalfSolver |
class | Wraps another solver, trading cost in order to provide error estimates. (That is, it means the solver can be used with an adaptive step size controller, rega... |
Heun |
class | Heun's method. |
ImplicitAdjoint |
class | Backpropagate via the implicit function theorem. |
ImplicitEuler |
class | Implicit Euler method. |
ItoMilstein |
class | Milstein's method; Itô version. |
KenCarp3 |
class | Kennedy--Carpenter's 3/2 IMEX method. |
KenCarp4 |
class | Kennedy--Carpenter's 4/3 IMEX method. |
KenCarp5 |
class | Kennedy--Carpenter's 5/4 IMEX method. |
Kvaerno3 |
class | Kvaerno's 3/2 method. |
Kvaerno4 |
class | Kvaerno's 4/3 method. |
Kvaerno5 |
class | Kvaerno's 5/4 method. |
LeapfrogMidpoint |
class | Leapfrog/midpoint method. |
LinearInterpolation |
class | Linearly interpolates some data ys over the interval \([t_0, t_1]\) with knots at ts. |
LocalLinearInterpolation |
class | LocalLinearInterpolation(t0: Union[jaxtyping.Real[Array, ''], jaxtyping.Real[ndarray, ''], numpy.number, int, float], t1: Union[jaxtyping.Real[Array, ''], ja... |
Midpoint |
class | Midpoint method. |
MultiButcherTableau |
class | Wraps multiple diffrax.ButcherTableaus together. |
MultiTerm |
class | Accumulates multiple terms into a single term. |
NoProgressMeter |
class | Indicates that no progress meter should be displayed during the solve. |
ODETerm |
class | A term representing \(f(t, y(t), args) \mathrm{d}t\). |
PIDController |
class | Adapts the step size to produce a solution accurate to a given tolerance. |
QUICSORT |
class | The QUadrature Inspired and Contractive Shifted ODE with Runge-Kutta Three method by James Foster and Daire O'Kane. |
RESULTS |
class | An enumeration, with the following entries: |
Ralston |
class | Ralston's method. |
RecursiveCheckpointAdjoint |
class | Enables support for backpropagating through diffrax.diffeqsolve by differentiating the numerical solution directly. |
ReversibleHeun |
class | Reversible Heun method. |
SEA |
class | Shifted Euler method for SDEs with additive noise. |
SPaRK |
class | The Splitting Path Runge-Kutta method. |
SRA1 |
class | The SRA1 method for additive-noise SDEs. |
SaveAt |
class | Determines what to save as output from the differential equation solve. |
SemiImplicitEuler |
class | Semi-implicit Euler's method. |
ShARK |
class | Shifted Additive-noise Runge-Kutta method for additive SDEs. |
ShOULD |
class | The Shifted-ODE Runge-Kutta Three method designed by James Foster. |
Sil3 |
class | Whitaker--Kar's fast-slow IMEX method. |
SlowRK |
class | SLOW-RK method for commutative-noise Stratonovich SDEs. |
Solution |
class | The solution to a differential equation. |
SpaceTimeLevyArea |
class | Pytree containing the dt time increment, W the Brownian motion, and H the Space Time Levy Area. |
SpaceTimeTimeLevyArea |
class | Pytree containing the dt time increment, W the Brownian motion, H the Space Time Levy Area, and K the Space Time Time Levy Area. |
SteadyStateEvent |
class | SteadyStateEvent(rtol: float | None = None, atol: float | None = None, norm: collections.abc.Callable[[jaxtyping.PyTree[jax.Array]], typing.Union[jaxtyping.R... |
StepTo |
class | Make steps to just prespecified times. |
StochasticButcherTableau |
class | A Butcher Tableau for Stochastic Runge-Kutta methods. |
StratonovichMilstein |
class | Milstein's method; Stratonovich version. |
SubSaveAt |
class | Used for finer-grained control over what is saved. |
TextProgressMeter |
class | A text progress meter, printing out e.g.: 0.00% 2.00% 5.30% ... 100.00% |
ThirdOrderHermitePolynomialInterpolation |
class | ThirdOrderHermitePolynomialInterpolation(*, t0: Union[jaxtyping.Real[Array, ''], jaxtyping.Real[ndarray, ''], numpy.number, int, float], t1: Union[jaxtyping.... |
TqdmProgressMeter |
class | Uses tqdm to display a progress bar for the solve. |
Tsit5 |
class | Tsitouras' 5/4 method. |
UnderdampedLangevinDiffusionTerm |
class | Represents the diffusion term in the Underdamped Langevin Diffusion (ULD). |
UnderdampedLangevinDriftTerm |
class | Represents the drift term in the Underdamped Langevin Diffusion (ULD). |
UnsafeBrownianPath |
class | Brownian simulation that is only suitable for certain cases. |
VeryChord |
class | The Chord method of root finding. |
VirtualBrownianTree |
class | Brownian simulation that discretises the interval [t0, t1] to tolerance tol. |
WeaklyDiagonalControlTerm |
function | DEPRECATED. |
adjoint_rms_seminorm |
function | Defines an adjoint seminorm. |
backward_hermite_coefficients |
function | Interpolates the data with a cubic spline. |
citation |
function | Autogenerate a list of BibTeX references for the numerical methods being used. |
citation_rules |
constant | Re-exported from builtins. |
diffeqsolve |
function | Solves a differential equation. |
is_event |
function | |
is_okay |
function | |
is_successful |
function | |
linear_interpolation |
function | Fill in any missing values via linear interpolation. |
rectilinear_interpolation |
function | Rectilinearly interpolates the input. |
steady_state_event |
function | Create a condition function that terminates the solve once a steady state is achieved. |
with_stepsize_controller_tols |
function | Wraps a root finding class to indicate that it should use the same tolerances as were provided to an adaptive stepsize controller. |