Priors#

Prior

Represent a PEP 604 union type

Priors

Group output, feature-wise, and cross-feature shape priors.

ValueBound

Bound model values over the model's complete input domain.

SlopeBound

Bound a feature's partial derivative over the complete input domain.

Monotonicity

Require monotonic increase or decrease in one feature.

Unimodality

Require a feature slice to have one minimum or maximum mode.

Convex

Require the model output to be jointly convex in all input features.

Concave

Require the model output to be jointly concave in all input features.

Nonnegative

Create the prior f(x) >= 0.

Nonpositive

Create the prior f(x) <= 0.

Increasing

Create an increasing monotonicity prior.

Decreasing

Create a decreasing monotonicity prior.

Lipschitz

Create a coordinate-wise Lipschitz prior.

parse_prior

Parse one legacy semantic specification into a bound prior.

parse_priors

Parse text specifications into the canonical priors container.