Hubert_segmentation: Finds the optimal Hubert segmentation of a series x

Description Usage Arguments Value Examples

View source: R/Hubert_segmentation.R

Description

Finds the optimal Hubert segmentation of a series x

Usage

1
Hubert_segmentation(x, alpha = 0.05, Kmax = +Inf)

Arguments

x

a series

alpha

the nominal type I error for the segmentation

Kmax

maximum order of the segmentation (defaults to +Inf: segmentation goes on as long as some cuts are significant at the alpha level)

Value

a list providing cuts location, test results and total error associated to the segmentation of the series

Examples

1
2
3
4
5
6
7
8
9
x=c(rnorm(130,3,2),
    rnorm(220,10,2),
    rnorm(500,2,2),
    rnorm(50,-4,2),
    rnorm(30,2,2),
    rnorm(120,8,2))
seg_obj=Hubert_segmentation(x)
plot(x)
lines(model_signal(x,seg_obj$locations), col="red",lwd=3)

lvaudor/hubr documentation built on May 3, 2019, 7:40 p.m.