Classification using generalized partial least squares