/op-algorithm

Optimal Partitioning Algorithm - Python Implementation

Primary LanguagePython

Optimal Partitioning Algorithm - Python Implementation

This is an implementation of Optimal Partitioning Algorithm as described here: https://ieeexplore.ieee.org/abstract/document/1381461

There are three functions in the module:

op(): Return a vector with the optimal changepoints.

backtracking(): Return the segments to plot, based on a vector built by op().

plot_segments(): Compute the mean of each segment and plot them.