Dynamic Programming
Bellman k-segmentation algorithm
The Bellman
$k$
-segmentation algorithm generates a segmented constant-line fit to a data series, but in trying to learn and implement this algorithm, I found it difficult to find the segmentation algorithm rather than the [apparently more common]$k$
-means algorithm, so in this article I describe and provide code for the$k$
-segmentation algorithm.