Sparse nonlinear methods for predicting structured data