Functional pruning optimal partitioning with a graph structure to take into account constraints on consecutive segment parameters. This is an iterated version of the main gfpop function using a Birgé Massart like penalty
itergfpop(
data,
mygraph,
type = "mean",
weights = NULL,
iter.max = 100,
D.init = 1
)a gfpop object = (changepoints, states, forced, parameters, globalCost)
changepointsis the vector of changepoints (we give the last element of each segment)
statesis the vector giving the state of each segment
forcedis the vector specifying whether the constraints of the graph are active (= TRUE) or not (= FALSE)
parametersis the vector of successive parameters of each segment
globalCostis a number equal to the total loss: the minimal cost for the optimization problem with all penalty values excluded
Dvectis a vector of integers. The successive tested D in the Birgé Massart penalty until convergence
vector of data to segment. For simulation studies, Data can be generated using gfpop package function gfpop::dataGenerator()
dataframe of class "graph" to constrain the changepoint inference, see gfpop::graph()
a string defining the cost model to use: "mean", "variance", "poisson", "exp", "negbin"
vector of weights (positive numbers), same size as data
maximal number of iteration of the gfpop function
initialisation of the number of segments