# Would there be any advantage in using Neural Network regression instead of classification?

I have developed several models to predict a given output (let's say the output is something like "test score", that goes from 0% to 100%), based on several variables that influence that result

Since I'm not interested in predicting the actual precise score, but only in predicting the range in which it will be, and specially because my ML knowledge is 100% self learned and I had a very limited time to learn it, and so I wanted to minimize the number of models I had to learn (and I had already learned the classification NN algorithm), I have divided the outputs in classes according to range (for example, A would be 80-100%, B would be 60-80%, etc etc). Therefore, I used the Neural Network as a classification algorithm.

From a theoretical point of view, would there be any advantage in using the NN as a regression algorithm to predict an actual value instead of class?

## 2 Answers

One reason is the arbitrary nature of the 20% cut in the classes. It is telling the model that that 19% is more different to 21% than 21% is to 23%, say. I think someone else on here may be able to clarify this or formalise it better.

Another aspect is you will not need the softmax filter at the end, so is slightly computationally easier. Whether this helps with backprop in some way I do not know.

• (+1) One way to formalize it is to think about what the loss is in specific cases. The MSE loss for predicting 79 when the true value is 81 is the same as predicting 77 when the true value is 75. But the classification method gives dramatically different losses, even though the magnitude of the error is the same (2 points). This is why the classification approach is incoherent. – Sycorax Sep 10 '20 at 14:13
• Thank you both! So, would you both advise me to re-build the model, but as a regression model instead? – Johanna Sep 10 '20 at 14:47
• @Johanna Yes, model the data at the level of precision that is given. A simple MSE loss seems like a fine place to start; if you have a specific reason that you think MSE might be challenging or inappropriate for this task, perhaps you could ask a new question about that. – Sycorax Sep 10 '20 at 17:11

I think the two approaches might yield approximately equal results, but if your data suggest that there are clusters then the class approach might do better. Think of it like this, what if the data have a lot of values around 90 and around 30? In general, Regression approaches would be very sensitive to Outliers from some features and would cause miss-classifications or wrong values. It is all about a strong prior and what Model will fit the data. Take a look at this: Why not approach classification through regression?

• I don't understand the negative vote. – bonez001 Sep 10 '20 at 16:49
• I will read that thread, thank you! – Johanna Sep 10 '20 at 18:27
• (Not my negative vote btw, will vote it up because I don't understand it either) – Johanna Sep 10 '20 at 18:27