Skip to contents

This is VERY developmental - do not use

Methods


Method length()

Get the length of time series

Usage

rankCost$length()


Method new()

Initialise the cost function

Usage

rankCost$new(x, m = 0)

Arguments

x

numeric matrix of observations

m

numeric vector or matrix of mean values


Method baseCost()

Compute the non-anomalous cost of a segment

Usage

rankCost$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

rankCost$pointCost(b, pen)

Arguments

b

time step

pen

penalty cost


Method collectiveCost()

Compute the non-anomalous cost of a segment

Usage

rankCost$collectiveCost(a, b, pen, len)

Arguments

a

start of period

b

end of period

pen

penalty cost

len

minimum number of observations


Method param()

Compute parameters of a segment if anomalous

Usage

rankCost$param(a, b)

Arguments

a

start of period

b

end of period


Method clone()

The objects of this class are cloneable with this method.

Usage

rankCost$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

set.seed(0)
m <- runif(100)
s <- pmax(1e-4,runif(100))
x <- rnorm(100,m,s) ## example data