Tensor-based algorithms for image classification