Description Usage Arguments Value

Functional pruning optimal partitioning with a graph structure to take into account constraints on consecutive segment parameters. The user has to specify the graph he wants to use (see the graph function) and a type of cost function. This is the main function of the gfpop package.

1 |

`data` |
vector of data to segment |

`mygraph` |
dataframe of class "graph" to constrain the changepoint inference |

`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 |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.