Oracle inequalities and nonparametric function estimation