Learn R Programming

fpopw (version 1.1)

retour_sn: retour_sn

Description

Function used internally by Fpsn and Fpsn_w to do the backtracking and recover the best set of segmentations in 1 to K changes from 1 to n.

Usage

retour_sn(path)

Arguments

path

matrix of size (K x n) containing the last optimal changes up to j in k segments with i in \([1, n]\) and k in \([1, K]\). This matrix is computed in the Fpsn or Fpsn_w function using the colibri_sn_c or colibri_sn_weight_c functions.

Value

a matrix of size (K x K) containing the best segmentations in 1 to K segments.