|Fit a robust regression trend line using Huber loss.|
The most common type of linear regression—ordinary least squares (OLS)—can be heavily influenced by a small number of points with extreme values. Robust regression is an alternative method for fitting a regression line; it is not influenced as strongly by a small number of extreme values. As an example, see the following plot.
The original metric is shown as a solid blue line. The purple dashed line is an OLS regression line, and the yellow dashed line is a robust regression line. The one short-lived spike in the metric leads to the OLS regression line trending upward, but the robust regression line ignores the spike and does a better job fitting the overall trend in the metric.
|Fit an ordinary least squares regression line through the metric values.|
sin(x) * x/2 + x then
trend_line(sin(x) * x/2 + x) has the following shape:
|Approximate the metric with a piecewise function composed of constant-valued segments.|
piecewise_constant(x) has the following shape:
Consult the other available functions: