Learning Nonparametric Models for Probabilistic Imitation