donlnz / nonconformist

Python implementation of the conformal prediction framework.
MIT License
426 stars 95 forks source link

Support for prediction bands? #15

Open mnarayan opened 6 years ago

mnarayan commented 6 years ago

Hello,

I couldn't figure out from checking the code and limited documentation if there is support for providing prediction intervals or bands around future predictions. For instance, as in https://rss.onlinelibrary.wiley.com/doi/abs/10.1111/rssb.12021 https://amstat.tandfonline.com/doi/abs/10.1080/01621459.2017.1307116 or in related work.

It looks like only p-values are supported as in https://github.com/donlnz/nonconformist/blob/master/nonconformist/icp.py#L358.

Would you be open to PRs that provide prediction intervals, empirical coverage probabilities as well?

Thanks,

donlnz commented 5 years ago

I agree that my documentation is a bit unclear here, but IcpRegressor does indeed produce prediction intervals, i.e., for each test object, we will receive a lower bound and an upper bound for the prediction value (given that we have supplied the predict()-method with a significance level).