least squares for classification