myOP: Optimal Partitioning

Description Usage Arguments Value Examples

View source: R/OP.R

Description

Optimal Partitioning Algorithm

Usage

1
myOP(data, cost = "gauss", beta = best_beta(data))

Arguments

data

vector of data points

cost

type of my cost (gauss or poisson)

beta

penalty value

Value

a vector of changepoints, a number for the complexity (cost of computations)

Examples

1
2
3
myOP(c(0,0,1,1,0,0,0), beta = 0.00001)
myOP(c(rnorm(50, mean = 0, sd = 0), rnorm(50, mean = 10, sd = 0)))
myOP(data_generator(25, chpts = c(10,20), means = c(20,0,20), type = "gauss"), beta = 5)

Qrtsaad/CHANGEPOINT documentation built on Dec. 18, 2021, 8:42 a.m.