[WIP] GBTRegressor does not provide uncertainty estimates #9
Conversation
# noise level depends on value of `X` | ||
return np.abs(2.5-X)/2.5 + 0.1 | ||
|
||
def sample_noise(X, std=0.2, noise=constant_noise): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should pass in rng
/use check_random_state
Wrap a GBTRegressor to provide uncertainty estatimates as well as central predictions
def constant_noise(X): | ||
return np.ones_like(X) | ||
|
||
def sample_noise(X, std=0.2, noise=constant_noise): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use random_state
pattern instead of relying on global rng
I am not fond of the nomenclature, std != uncertainty != quantile. |
I'm flexible, but out of ideas at the moment for a good (short) name.
|
I'm planning to review my GradientBoosting know-how, this weekend. Can have a look after that. |
If you need this merge it, I'm away till Monday night without internet |
random_state=rng) | ||
for a in self.quantiles] | ||
for rgr in self.regressors_: | ||
rgr.fit(X, y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self
The last item on the to do list: "check definition of uncertainty" is something I'd like to punt to #23, instead of waiting to merge this till we converge. |
This looks ok to me. |
📈 |
Would be good to expose the |
Started a simple wrapper for regressors like GBTRegressor to provide uncertainty estatimates as well
as central predictions.
Any ideas on how to test that this indeed gives the central and 68% confidence interval (right terminology??) predictions? Best idea so far is to use a very large number of samples on a simple problem and check that the predicted standard deviation is approximately equal to the std used when sampling.
Todo: