Closed Vinnie-Palazeti closed 2 years ago
Hi, thanks for reporting! The prediction intervals should contain the point predictions, so there might be a bug here. Let me check your code and the source code.
@elephaint forgot to add the scale = False image.
I haven't looked through the pgbm.py file closely, so sorry for not being helpful. Though, even in the second image there are point predictions outside of the plotted bounds. I did not noticed this before.
Hi,
There was an error in how the lognormal distribution was fitted against the obtained empirical mean and variance from the algorithm, which would only manifest itself if the underlying location of the normal distribution was less than zero. This is the case when scale=True
in your example, but not when scale=False
. Anyways, I fixed the bug and there is a new version 1.7 that does display the correct behaviour in my offline test:
Note that it can be the case of course that the observed values are outside the prediction intervals. However, the means will now be included in the prediction intervals. Hope that helps and that your error is fixed.
@elephaint I really appreciate the quick response. Thank you & be well!
Describe the bug I am returning predictions intervals that do not contain the point predictions. The data I am working with is lognormally distributed and scaled-down, as shown below, by a factor of 10. Am I misunderstanding something fundamental about this type of data distribution? or should the prediction intervals contain the point predictions?
To Reproduce
with scale = True
with scale = False