deel-ai / puncc

👋 Puncc is a python library for predictive uncertainty quantification using conformal prediction.
https://deel-ai.github.io/puncc/
252 stars 14 forks source link

Is there an easy way to get the quantile that you use to build the interval? #35

Open lmossina opened 8 months ago

lmossina commented 8 months ago

How can we get the conformalizing quantile after cp.fit(...)?

Maybe we could get something like:

cp.get_conformalizer(alpha=0.043) > 3.095

The nonconformity scores should already stored somewhere in the object, after fit, it would boil down to apply the correct (non trivial?) quantile formula from within puncc to the array of scores.

M-Mouhcine commented 8 months ago

With the current implementation, you can retrieve the nonconformity scores as follows:

ncs= cp.get_nonconformity_scores()

We could indeed add a feature to return the inflated quantiles. I will tag this as an enhancement request in the issue tracker.