fpopTree: Functional Pruning Optimal Partitioning for data structures...

Description Usage Arguments Value

View source: R/fpopTree.R

Description

Functional pruning optimal partitioning with data in a tree structure

Usage

1
fpopTree(vertex_data, tree, type = "mean", weights = NULL, testMode = FALSE)

Arguments

vertex_data

vector of data associated to each vertex

tree

tree structure encoded in a list

type

a string defining the cost model to use: "mean", "variance", "poisson", "exp", "negbin"

weights

vector of weights (positive numbers), same size as data

testMode

boolean. False by default. Used to debug the code

Value

a gfpop object = (changepoints, states, forced, parameters, globalCost)

changepoints

is the vector of changepoints (we give the last element of each segment)

states

is the vector giving the state of each segment

forced

is the vector specifying whether the constraints of the graph are active (=1) or not (=0)

parameters

is the vector of successive parameters of each segment

globalCost

is a number equal to the total loss: the minimal cost for the optimization problem with all penalty values excluded


vrunge/fpopTree documentation built on Feb. 6, 2021, 6:12 p.m.