cpLabel: Visual Interface for Labeling and learning a penalty function

Description Usage Arguments Details Value Author(s) References Examples

View source: R/cpLabel.R

Description

This Function implements a simple changepoint labeling tool as well as the penalty learning algorithm to learn a penalty function that can be used to accurately predict changepoints in labeled data.

The function starts a shiny server and acompanying web interface that displays:

  1. The univariate dataset (top left)

  2. Control Pannel (top right)

The main form of interaction with the interface is through selecting a label type (top right) and then selecting regions of the data which you would like to assign said label type. Additionaly, by clicking "learn Penalties" a penalty function is learned from the labeled data and the resulting changepoint(s) are displayed.

Usage

1
cpLabel(data, unsupervised_changepoints = FALSE)

Arguments

data

A univariate dataset.

unsupervised_changepoints

a boolean value, if set to TRUE, the function will try to load changepoints that were created by cpVisulaise and use these to label the data on startup.

Details

This function is used to both label a dataset and to learn a penalty function from the labeled data. Furthermore, this labeled data can be exported for use in other applications.

NoLabel

Used to create regions where no changepoints should be.

ChangePointRegion

Used to create regions where changepoints should be.

NumberofSegments

Used to determine how many models should be evaluated for the given labeled data. Roughly equates to the number of changepoints you belive should be in the data.

LearnPenalties

Run the penalty learning algorithm given the labeled data. Returns predicted changepoints.

SaveLabels

Saves the labels as a .csv file.

In addition to the base functionality, this function also allows the data to be pre-labeled using changepoints found using the unsupervised methods in cpVisualise. This can be done by first selecting and saving a solution in cpVisualise (by clicking the "save changepoints" button) and then running cpLabel with unsupervised_changepoints set to TRUE.

For an extended usage example, please see the accompanying website: https://sites.google.com/view/changepointvis/home

Value

starts a shiny app in a new window

Author(s)

Oliver Ford

References

Toby Hocking, Guillem Rigaill, Jean-Philippe Vert, Francis Bach ; Proceedings of the 30th International Conference on Machine Learning, PMLR 28(3):172-180, 2013.

Examples

1
2
3
4
5
## Not run: 
data = c(rnorm(100,0,1),rnorm(100,5,1))
cpLabel(data)

## End(Not run)

OllieFord/ChangepointVis documentation built on Aug. 26, 2019, 7:53 p.m.