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: predict(which="_dargs")
private which values for internal use.
#7923
Comments
I think this is a very bad idea from the point of view of API. If you do this it shows up in the docs. Better to take the least worst option of making it an undocumented kwarg. If you really, really want to do this, you could write a custom sentinel value like |
which e.g. the list at the bottom in https://www.statsmodels.org/dev/generated/statsmodels.discrete.count_model.GenericZeroInflated.predict.html |
Not true. Look at the signature at the top. |
As a rule parameters should never be added without doc strings. Even if this docstring say the attribute is not guaranteed to be there in future versions. |
This would not be adding the Instead of the current:
We could add that there are additional values for |
predict(which="_dargs")
private which for internal use.predict(which="_dargs")
private which values for internal use.
I would like to add other returns (which) to model.predict that are for internal use.
However, they might not follow the public, results.predict api (e.g. multi-column returns, or tuple returns)
One possibility would be to add the leading underscore to signal it's private.
The main advantage of reusing predict is the argument handling, exog, exog_xxx, offset, exposure, ....
Also model.predict is reused by results.get_prediction, which would be nice to get standard errors and confint for other statistics.
we could even add out-of-sample loglike_obs and other measures (not sure loglike_obs needs endog)
The text was updated successfully, but these errors were encountered: