A Linearly Constrained Nonparametric Framework for Imitation Learning