hcp_cf_lr: Change Finder using Linear Regression

View source: R/hcp_cf_lr.R

hcp_cf_lrR Documentation

Change Finder using Linear Regression

Description

Change-point detection by modeling residual deviations with linear regression and applying a second-stage smoothing and thresholding, inspired by ChangeFinder doi:10.1109/TKDE.2006.1599387.

Usage

hcp_cf_lr(sw_size = 30)

Arguments

sw_size

Integer. Sliding window size for smoothing/statistics.

Value

hcp_cf_lr object.

Examples

library(daltoolbox)

# Load change-point example data
data(examples_changepoints)

# Use a simple example
dataset <- examples_changepoints$simple
head(dataset)

# Configure ChangeFinder-LR detector
model <- hcp_cf_lr()

# Fit the model
model <- fit(model, dataset$serie)

# Run detection
detection <- detect(model, dataset$serie)

# Show detected change points
print(detection[(detection$event),])


harbinger documentation built on Feb. 11, 2026, 9:06 a.m.