Skip to content

laplax.enums

Enums for Laplace approximations.

CalibrationObjective

Bases: StrEnum

Supported calibration objectives (minimisation!).

Source code in laplax/enums.py
class CalibrationObjective(StrEnum):
    """Supported calibration objectives (minimisation!)."""

    NLL = "nll"
    CHI_SQUARED = "chi_squared"
    MARGINAL_LOG_LIKELIHOOD = "marginal_log_likelihood"
    ECE = "ece"

CalibrationMethod

Bases: StrEnum

Supported calibration methods.

Source code in laplax/enums.py
class CalibrationMethod(StrEnum):
    """Supported calibration methods."""

    GRID_SEARCH = "grid_search"

Pushforward

Bases: StrEnum

Supported pushforward types for pushing forward weight space uncertainty.

Source code in laplax/enums.py
class Pushforward(StrEnum):
    """Supported pushforward types for pushing forward weight space uncertainty."""

    LINEAR = "linear"
    NONLINEAR = "nonlinear"

Predictive

Bases: StrEnum

Supported predictive types for crossing softmax transformation.

Source code in laplax/enums.py
class Predictive(StrEnum):
    """Supported predictive types for crossing softmax transformation."""

    MC_BRIDGE = "mc_bridge"
    LAPLACE_BRIDGE = "laplace_bridge"
    MEAN_FIELD_0 = "mean_field_0"
    MEAN_FIELD_1 = "mean_field_1"
    MEAN_FIELD_2 = "mean_field_2"
    NONE = "none"  # Intended for regression flag

DefaultMetrics

Bases: StrEnum

Supported default metric settings.

Source code in laplax/enums.py
class DefaultMetrics(StrEnum):
    """Supported default metric settings."""

    CLASSIFICATION = "classification"
    REGRESSION = "regression"