I plotted a runtime(in seconds) vs input plot for a function as follows:
You can observe a lot of runtimes which larger than expected represented by the individual points above.
I want to map these points to their expected time downwards to get an ideal step function as follows:
RED dots = runtimes which larger than expected
In the following case the RED dots get mapped to respective expected runtimes:
But it is not always easy to decide where the RED dots should be mapped. For eg:
In the above case, how will we decide to map the RED dot to runtimes T1 or T2?
Also, there are following cases in which we cannot be sure on how to map the RED dots downwards to their ideal or expected runtimes:
The blue dots can create noise for mapping the RED dots downwards in case if we decide to map the dots by judging the neighbours
Finally, there can be a lot of noise as in the following Case:
So, the aim is to achieve an ideal step function to the best possible accuracy by mapping the RED dots downwards to their ideal expected runtimes
Will be thankful for any suggestion.






