Penalties#

Penalties govern the trade-off between the number of change points and the fit of the model. They are used by all detectors in skchange.

Base#

BasePenalty([scale])

Base class template for penalties.

Constant penalties#

The penalty for each additional change point in the model is constant.

ConstantPenalty(base_value[, scale])

Constant penalty.

BICPenalty([scale])

Bayesian Information Criterion (BIC) penalty.

ChiSquarePenalty([scale])

Penalty based on a probability bound on the chi-squared distribution.

Linear penalties#

The penalty for each additional change point in the model is linear in the number of variables affected by the change. Only relevant for multivariate data and detectors supporting variable identification.

LinearPenalty(intercept, slope[, scale])

Linear penalty.

LinearChiSquarePenalty([scale])

Linear Chi-square penalty.

Nonlinear penalties#

The penalty for each additional change point in the model is non-linear in the number of variables affected by the change. Only relevant for multivariate data and detectors supporting variable identification.

Composition#

MinimumPenalty(penalties[, scale])

Pointwise minimum of two penalties.

Utility functions#

as_penalty(x[, default, require_penalty_type])

Convert an input object to a constant penalty.