Is there a well known and proven algorithm to find the TOP (finite) limit of a set of points, which are time based metrics? I'm looking for an existing implementation, in order not to invent the wheel of something which already exists.
This is what I have in mind, but it is a bit hard to configure the right parameters, and requires iterations:
Run over the numeric values of a series
- Calculate L which is the top limit, and E (E is configurable), where 2*E is the convergent stripe around L.
- Most points, P percentage, except of anomalies/noise, are below the top line of L+E (P is configurable, ranging somewhere at 95-99% range).
- A Linear line around the last X points (Linear Regression) has a minor slope of +/-S (X and S are configurable)
- The algo uses a stored state of a previous maximum limit - max-L.
- In case L which was calculated in (a) is lower than max-L, it is considered a local max which is discarded
- If L is greater than max-L then it is considered a new max limit and stored as the new max-L
The question is do you know of an existing algorithm to fulfil this, or add any suggestions to the algorithm I created. Thanks!
NOTE: Just to be clear, as an input I have a set of data points, each with a real value and a timestamp. There is no function input, just those points. This mean, that the algorithm might detect a limit, which when inspecting all the historical data points would look like a true maximum limit, but then later in time new data points would be higher and yield a new higher limit. meaning that the algorithm I'm looking for would only find "local" limits.