Home / Companies / Datadog / Blog / Post Details
Content Deep Dive

Piecewise regression: When one line simply isn’t enough

Blog post from Datadog

Post Details
Company
Date Published
Author
Stephen Kappel
Word Count
1,150
Language
English
Hacker News Points
22
Summary

Stephen Kappel discusses Datadog’s method of automating piecewise regression to analyze timeseries data, addressing the challenges of identifying breakpoints and determining the number of segments without manual input. The approach involves using a greedy algorithm to efficiently navigate the exponential solution search space by initially overfitting the data with numerous segments and then iteratively merging segments to minimize error while preventing overfitting. The stopping criterion is based on the increase in total sum of squared errors, ensuring the algorithm halts merging when the error increase is minimal. Datadog's solution is implemented in a Python library, which also supports variations such as using different error metrics or fitting step functions, providing flexibility in analyzing different types of data.