Bayesian hierarchical kernel machines for nonlinear regression and classification