. . . and this will work by definition for a regression problem but not for a classification problem. To achieve the aim of the latter, we will need a different function where we could get something like the probability of a class membership. i.e.. If the probability is greater than 0.5, we predict a class, if it is less than 0.5, we predict another class. This is what a logit model (logistic regression) gives us.