Cluster the paths into a flat set P flat = {P ∈ P : D(P ) < t flat } where the function value changes by a small amount (according to some tolerance t flat ) along the path. Consider the rest of the paths to be non-flat P non-flat = P \ P flat .