I ran into a really cool problem some time ago, which looked like an almost linear graph on a long interval but was infact a piecewise function that broke a lot of times. The attached document is basically a solution to those type of problems, this solution assumes that the largest kernel i.e. the Grand Kernel is the main pattern, which is why it is conviniently called occam's Razor.