Robust Non-parametric Function Fitting