Switching nonparametric regression models