Regression#

Why regression?#

Well, not all cases are classification problems. There are times where you can easily separate things into labels. For example, if the probability of rain is 59% and 60%, you’ll think that it’s basically the same. However, getting 59 and 60 in an exam can mean failing the semester vs passing the semester. In these two cases, we say the first one is a regression problem and the second one a classification one. We need regression instead of classification when it just makes no sense to even try separate close numbers.

How does regression work?#

Image we are predicting the stock market next year (again, not a wise thing to do, but a good example). You noticed in the previous years that the stock market index is related to the number of your hairs by the relation \( s = 0.05h - 3000 \), \( s \) is the index and \( h \) is the number of hair. You create a model and then make a profit, while doing hair transplants to ensure that the stock performs well.

In this case, you created a model that maps some inputs (the number of hairs) to some outputs (in this case, the number of stock). If you can find a good model that does this mapping well, then you found a good regressor.