You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it will be possible to do it in 0.4.1 without breaking backwards compatibility if we don't remove imports from the __init__.py
Remove all imports from __init__.py for release 0.5.0
I haven't looked at subdirectories at lower levels, eg. genmod.families which doesn't have code that isn't needed by GLM. An api.py is really not necessary in this case, unless we add generic functions in there (e.g. pre-specified transformation that I want also for other models and methods)
One other exception, directories for only internal use have an empty __init__.py already, e.g.
statsmodels\base has only the test runner in the __init__.py
statsmodels\tsa\base completely empty
statsmodels\compatnp completely empty
statsmodels.api loads some subdirectories, i.e. actual path not an api-path
from . import datasets, distributions, iolib, regression, robust, tools
regression.__init__ only has yule_walker, why? -> we can add api with minimal changes robust.__init__ has all (?) relevant imports that should instead be in an api.py distributions.__init__ also has relevant imports, but I haven't added copula to it. copula has distributions.copula.api iolib.__init__ has some functions but not the summary module/functions tools.__init__ has add_constant, categorical. Most modules are internal, maybe eval_measures and some other could be in an api.py
discrete: __init__ is empty (except test), no api.py. statsmodels.api imports models but no directory/api
We should start an api.py. We have now more that one module with models in discrete.
The same for imputation.
miscmodels __init__.py is empty has api.py with old models. not imported into sm. OrderedModel missing in api
distributions.__init__ we have more count distributions, e.g. truncated in pr #7973
also the new in 0.13 DiscretizedCount distribution seem to be missing from apis, but it's in rst docs with statsmodels.distributions.discrete as path
discrete also does not have api.py
There is not simple import to get e.g. all count models, those are spread over discrete_model, count_model and truncated_model
I think we don't want OrderedModel in the discrete.api, in case we want a refactored backwards incompatible version of the model in discrete, e.g. superclass of OrderedModel will change, and the model/results will loose some GenericLikelihood methods.
Activity
josef-pkt commentedon Aug 14, 2013
still open, without api.py: genmod and robust, and ...
jbrockmendel commentedon Oct 12, 2017
closable?
jbrockmendel commentedon Sep 2, 2018
Accept PR to finish this off?
josef-pkt commentedon Sep 21, 2021
statsmodels.api loads some subdirectories, i.e. actual path not an api-path
from . import datasets, distributions, iolib, regression, robust, toolsregression.__init__only has yule_walker, why? -> we can add api with minimal changesrobust.__init__has all (?) relevant imports that should instead be in an api.pydistributions.__init__also has relevant imports, but I haven't added copula to it. copula hasdistributions.copula.apiiolib.__init__has some functions but not thesummarymodule/functionstools.__init__has add_constant, categorical. Most modules are internal, maybe eval_measures and some other could be in an api.pydiscrete:__init__is empty (except test), no api.py. statsmodels.api imports models but no directory/apiWe should start an
api.py. We have now more that one module with models in discrete.The same for
imputation.miscmodels
__init__.pyis empty has api.py with old models. not imported intosm. OrderedModel missing in apijosef-pkt commentedon Jan 7, 2022
distributions.__init__we have more count distributions, e.g. truncated in pr #7973also the new in 0.13 DiscretizedCount distribution seem to be missing from apis, but it's in rst docs with
statsmodels.distributions.discreteas pathWe need to start with api.py in distributions.
josef-pkt commentedon Apr 14, 2023
discretealso does not have api.pyThere is not simple import to get e.g. all count models, those are spread over discrete_model, count_model and truncated_model
I think we don't want OrderedModel in the
discrete.api, in case we want a refactored backwards incompatible version of the model indiscrete, e.g. superclass of OrderedModel will change, and the model/results will loose someGenericLikelihoodmethods.