Interval scorers#
Interval scorers evaluate a scalar score on intervals of a time series. They
are the building blocks of all detectors in Skchange and come in several
flavours: costs, change scores, savings, and transient scores. All scorers
share the common base class
BaseIntervalScorer.
Base classes#
Base class for interval scorers. |
|
|
Base class for cost scorers. |
Base class for change score scorers. |
|
Base class for saving scorers. |
|
Base class for transient score scorers. |
Costs#
A cost measures how well a single interval is fit by a parametric model.
|
Empirical distribution function (EDF) cost. |
Gaussian (negative log-likelihood) cost function. |
|
|
L1 (absolute error) cost function. |
|
L2 (squared error) cost function. |
Laplace distribution twice negative log-likelihood cost. |
|
|
Linear regression sum-of-squared-residuals cost. |
|
Linear trend cost function. |
Multivariate Gaussian (negative log-likelihood) cost. |
|
|
Multivariate T-distribution twice negative log-likelihood cost. |
Poisson distribution twice negative log-likelihood cost. |
|
|
Rank-based multivariate cost. |
Change scores#
A change score measures the evidence for a change between two adjacent
intervals. CostChangeScore adapts any cost into a change score.
|
Continuous linear trend change score. |
|
Change scorer constructed from a cost scorer. |
|
CUSUM change score for a change in mean. |
|
ESAC score for detecting changes in the mean of high-dimensional data. |
|
Multivariate Gaussian change score for a change in mean and/or covariance. |
Rank-based change score for multivariate data. |
Savings#
A saving measures the evidence that an interval deviates from a baseline model. Savings are used by segment-anomaly detectors such as CAPA.
|
Gaussian saving for a fixed mean and variance baseline. |
|
L1 saving for a fixed median baseline. |
|
L2 saving for a fixed baseline mean. |
|
Laplace saving for a fixed location and scale baseline. |
|
Linear regression saving for a fixed coefficient baseline. |
|
Linear trend saving for a fixed slope/intercept baseline. |
|
Multivariate Gaussian saving for a fixed mean and covariance baseline. |
|
Multivariate T-distribution saving for a fixed mean and scale baseline. |
|
Poisson saving for a fixed rate baseline. |
Transient scores#
A transient score measures the evidence for a short-lived deviation inside an
interval. Transient scores are used by detectors that target point anomalies
embedded in a longer segment. CostTransientScore adapts any cost
into a transient score.
|
Transient score constructed from a cost scorer. |
Native L2 transient score (epidemic changepoint model). |
Predicates#
Type predicates for runtime checks on scorer instances.
|
Return True if the given estimator is (probably) a cost scorer. |
|
Return True if the given estimator is (probably) a change score scorer. |
|
Return True if the given estimator is (probably) a saving scorer. |
|
Return True if the given estimator is (probably) a transient score scorer. |
|
Return True if the given estimator is an aggregated interval scorer. |
|
Return True if the given estimator is a penalised interval scorer. |