Probabilistic ML with Quantile Matching: an Instance with Python | by Davide Burba | Sep, 2023
A little bit-known approach for turning quantile regression predictions right into a likelihood distribution.
Once we practice regressive fashions, we receive level predictions. Nevertheless, in observe we are sometimes considering estimating the uncertainty related to every prediction. To realize that, we assume that the worth we are attempting to foretell is a random variable, and the purpose is to estimate its distribution.
There are various strategies accessible to estimate uncertainty from predictions, corresponding to variance estimation, Bayesian methods, conformal predictions, and many others. Quantile regression is certainly one of these well-known strategies.
Quantile regression consists in estimating one mannequin for every quantile you have an interest in. This may be achieved by means of an uneven loss perform, often called pinball loss. Quantile regression is straightforward, simple to know, and available in excessive performing libraries corresponding to LightGBM. Nevertheless, quantile regression presents some points:
- There is no such thing as a assure that the order of the quantiles will likely be right. For instance, your prediction for the 50% quantile may very well be better than the one you get for the 60% quantile, which is absurd.
- To acquire an estimate of your entire distribution, it’s good to practice many fashions. As an illustration, when you want an estimate for every level p.c quantile, you need to practice 99 fashions.
Right here’s how quantile matching might help.
The purpose of quantile matching is to suit a distribution perform given a pattern of quantile estimates. We will body this as a regression downside, so the curve doesn’t must completely match the quantiles. As a substitute, it ought to be “as shut as attainable”, whereas preserving the properties which make it a distribution perform.
Particularly, we’re considering estimating the inverse cumulative distribution perform: given a…