Fpsn_w_nomemory {fpopw}R Documentation

Fpsn_w_nomemory

Description

Function to run the weighted pDPA algorithm (Rigaill 2010 and 2015) without storing the set of last changes. It only return the cost in 1 to Kmax changes. It uses functional pruning and segment neighborhood. It optimizes the weighted L2-loss (w_i (x_i - \mu)2) for 1 to Kmax changes.

Usage

Fpsn_w_nomemory(x, w, Kmax, mini = min(x), maxi = max(x))

Arguments

x

a numerical vector to segment

w

a numerical vector of weights (values should be larger than 0).

Kmax

max number of segments (segmentations in 1 to Kmax segments are recovered).

mini

minimum mean segment value to consider in the optimisation

maxi

maximum mean segment value to consider in the optimisation

Value

return a list with the costs J.est in 1 to Kmax changes.

Examples

res <- Fpsn_w_nomemory(x=rnorm(10^4), w=rep(1, 10^4), K=100)

[Package fpopw version 1.1 Index]