VERY experimental - do not use
Methods
Get the length of time series
Method new()
Initialise the cost function
Arguments
x
observations as for gauss_reg
family
for fitting
Method baseCost()
Compute the non-anomalous cost of a segment
Usage
localRegCost$baseCost(a, b, pen = 0)
Arguments
a
start of period
b
end of period
pen
penalty cost
Method pointCost()
Compute the point anomaly cost of a time step
Usage
localRegCost$pointCost(b, pen)
Arguments
b
time step
pen
penalty cost
Method collectiveCost()
Compute the non-anomalous cost of a segment
Usage
localRegCost$collectiveCost(a, b, pen, len)
Arguments
a
start of period
b
end of period
pen
penalty cost
len
minimum number of observations
Compute parameters of a segment if anomalous
Arguments
a
start of period
b
end of period
Method clone()
The objects of this class are cloneable with this method.
Usage
localRegCost$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.