joneswack / conformal-predictions-from-scratch

Various Conformal Prediction methods implemented from scratch in pure NumPy for an educational purpose.
181 stars 22 forks source link

cal_prediction_bands In CQR NB undefined #2

Closed jplasser closed 8 months ago

jplasser commented 8 months ago

Hi! Thanks for the awesome repo for CP, the NBs even run in Juno on my iPad (MAPIE runs too, but great stuff anyways).

I was experimenting with the NBs and found the following line of code in the CQR-NB keeps failing: cal_coverage = compute_coverage(y_cal, cal_prediction_bands[:,:,0])

cal_prediction_bands is not defined at this stage.

Not sure, what you were about to accomplish here, surely you can clarify and commit a fix.

Thanks, Jürgen

joneswack commented 8 months ago

Hi Jürgen! Thanks a lot for pointing this out! The code was still working for me when I uploaded the notebook because some variables were stored in memory. I redefined the cal_prediction_bands in the notebook and committed the change. Feel free to try the code again :)

jplasser commented 8 months ago

Hi, no problem, been there, done that. This is a classic error with Jupyter notebooks. Thx for fixing!