fit piecewise linear data for a specified number of line segments
piecewise-regression (aka segmented regression) in python. For fitting s...