Grid-Based Machine Learning with Tensor Decompositions