New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] quantile
method for distributions, default implementation of forecaster predict_quantiles
if predict_proba
is present
#4513
Conversation
FYI @yarnabrina, re probabilistic predictions - would appreciate a reivew! |
quantiles
method for distributions, default implementation of forecaster predict_quantiles
if predict_proba
is presentquantile
method for distributions, default implementation of forecaster predict_quantiles
if predict_proba
is present
Looks okay, but two questions:
|
This is not an estimator capability, but a capability of distributions. Currently indeed there are only
That happens indirectly, my thinking is that the preferred method to use as a default for To see that we always have a default if just one of the methods is implemented, in the current PR, let's consider two cases where Case 1: both Case 2: only These cases are distinct and exhaustive, assuming at least one other method is implemented. Do you think we should do this differently? Or, same logic, but implement it differently? |
@yarnabrina, merging to have some fix in place for the release action, but happy to change the logic later on |
I completely agree with the logic, but I think I'm missing how If actual (non-base) estimator do not define Do we not need something like this here in sktime/sktime/forecasting/base/_base.py Line 2106 in 195e517
If I have missed some logic which will call |
@yarnabrina, moved discussion here: (I've merged the above as a fix to a blocker in the deprecation which was blocking the release, but we should get this sorted out!) |
This PR introduces a
quantile
method to allsktime
distributions.This complements
ppf
(which also returns quantiles) in that it returns quantiles in the same format as forecasters'predict_quantiles
, and broadcasts quantile points in the same way as in forecasters.This PR also adds a default implementation of
predict_quantiles
ifpredict_proba
is present, through callingquantiles
of thepredict_proba
return.This also enables the common usage pattern beyond 0.18.0, where
quantile
is called on thepredict_proba
return, similar to thetensorflow
method, but in ansktime
compatible mtype.