How to bound a regressor function?

I've seen similar questions on here, but none seem to quite apply to my use case.

I want to predict Metacritic scores bases on a number of features. Metacritic scores are bounded to a 0-100 scale, using Python's GradientBoostRegressor I do however get predictions which are outside of this bound (i.e. <0 or >100) - this is with a solid R² score of 89. How can I prevent this behaviour? I could just bound all outputs to that scale after prediction (so something as simple as y_pred[y_pred > 100] = 100), but that seems like cheating. And while there is an improvement in scores by doing that, it is very much negligible.

Ideally I'd like to incorporate this into the model itself as it's just such an obvious thing, although I can't seem to find how and if that is possible at all.

• Why is predicting scores above 100 or below 0 a problem? Why is clamping the scores outside of the [0, 100] interval a bad solution? In what sense is it "cheating," and why is "cheating" in this sense a bad thing?
– Sycorax
Sep 3, 2020 at 15:58
• @Sycorax My intuition is that those are obviously wrong predictions and therefore problematic. It is also intuitively "cheating" because I am thinking of the regressor as a function which we can stretch and compress. I thought by manually setting the bounds, we might also be able to change all other output values. The closest thing to that would be to normalise to the [0,100] interval I suppose, though I was thinking of there being a solution before reaching the predictions. Sep 3, 2020 at 16:07
• You could divide your target by 100 and follow the procedure suggested here. Is there a reason this does not suit your needs? stats.stackexchange.com/questions/204154/…
– Sycorax
Sep 3, 2020 at 16:21
• If you are willing to take a probabilistic approach (or full bayesian even), a natural way to bound your predictions is to use a sensibly bounded likelihood, like a truncated distribution for example. Sometimes working with these probabilistic models allows you to encode information about how things behave near the boundaries and improve the predictions in that region. If the large majority of data is in the interior, then likely your predictions will be too and this might not matter much, i.e won't be much different than bounded predictions after the fact. Sep 3, 2020 at 16:42
• @MichaelM GradientBoostRegressor is a boosted decision tree. The boosting weights can be any number. The sum $S$ of the trees' predictions gives the model's prediction. You could transform $S$ to bound it, and that's basically the content of the question: which transformations make sense for this task.
– Sycorax
Sep 3, 2020 at 19:57