Search code examples
machine-learningstatisticsartificial-intelligenceregression

How to make a regression that never underestimates but may overestimate?


Let's say I am making an AI that predicts how many police cars are needed for an emergency situation, using multiple regression. When using linear regression, it overestimates half of the time and underestimates for the other half. But I can't underestimate, but it is somewhat ok if it overestimates. Which method should I use to prevent that?

I'm using Python BTW.


Solution

  • You might want to look into Quantile Regression. Of course the limitations mentioned by @Florian H are still true for that approach. By selecting a higher Quantile (e.g. 75% quantile) you can train your model to favour overestimations.

    enter image description here

    The respective loss function is quantile loss.