The problem is to predict a value y ∈ Y (output, class) from an observed value of a vector x ∈ X (predictors, inputs, attributes), the relations between y and x given in (empirical) data D − {(xi,yi) : i − 1,...,N}, listing N observed pairs. We propose an estimation algorithm using a classification of D in clusters {Ω1,....,Ωm}, based on a distance function in X × Y. For each cluster Ωi compute the centroid yi of y, and denote the X-projection of Ωi by Ωix. Prediction of y given x ∈ X is done by assigning the point x to a nearest projected cluster, say Ωix, and using yi as estimate for y. Numerical tests show the method, in its basic general form, to give accurate predictions for well-known data sets.