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

Multivariate quantile #22

Open M-Mouhcine opened 10 months ago

M-Mouhcine commented 10 months ago

The method deel.puncc.api.utils.quantile is to be updated to compute the $\boldsymbol{x}$-th quantile of a matrix-shaped input $\boldsymbol{a}$ $\in \mathbb{R} ^{n \times m}$, $n$ being the number of examples and $m$ the number of attributes in the output space. The expected result is a vector $\boldsymbol{q}$ $\in \mathbb{R}^m$, where the $i$-th element is the $x_i$-th quantile of the $i$-th column of $a$.

  1. $\boldsymbol{x}$ can either be a vector $\in (0,1)^{m}$ or a scalar. In the latter case, it is duplicated $m$ times to be $\in (0,1)^{m}$.
  2. The weights $\boldsymbol{w}$ should either be $\in (0,1)^{n \times m}$ or $\in \mathbb{R} ^{n}$. In the latter case, it is duplicate $m$ times to be $\in (0,1)^{n \times m}$.
  3. Update NotImplementedError raised when $a$ is not unidimensional.
  4. The implementation should ensure backwards compatibility. All previous code must run with the previously provided function signature.
  5. Update documentation.
  6. Add tests.