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
Defined in tools.dump2module but not used elsewhere within statsmodels (useful externally?). A not-quite-identical class is defined in statsmodels/sandbox/tests/maketests_mlabwrap.py and used both there and in statsmodels/sandbox/tests/savervs.py
We don't have yet a proper class hierarchy for Bunch/Holder classes, so the easiest is to just define them where they are needed. For hypothesis tests they get sometimes converted to some kind of Results classes with extra methods.
Design for inheritable Bunch/Holder/TestResults classes is still open.
(My Stata export do file defines new Holder classes each time.)
I have some spare time and could consolidate this, i.a., into a proper class hierarchy, and then redirect current definitions to use one of the two classes. After that, I'm very willing to look at Hold(It/er) and TestResults, but that might not get done soon.
@josef-pkt@bashtage where'd you suggest to place the Bunch definition in the code base? My initial thoughts were to create a new module parameter_objects in sm/tools , which would then expose these classes.
The problem is that I actually don't like Bunch classes (subclass of dict) anymore, i.e. I never use the dictionary access, and only like attribute access as in our Model Results classes.
based on a file search:
tsa (Chad in newer code) uses them quite a bit, but imported: from statsmodels.tools.tools import Bunch
there are some miscellaneous uses where a Bunch class is not always a Bunch(dict), but are just what I switched to calling Holder classes.
And there are many Bunch classes in Stata results, but those are part of the do file, i.e. autogenerated. (Those could be Holder classes because we only use attribute access AFAIK)
for test results as replacement of Bunch and Holder classes #277 first open issue from 2012 #1182 initial discussion from 2013
with still no general outcome, just a lot more special cases
Activity
bashtage commentedon Aug 24, 2018
You should see how many
class Bunchdefinitions there are.josef-pkt commentedon Aug 24, 2018
We don't have yet a proper class hierarchy for Bunch/Holder classes, so the easiest is to just define them where they are needed. For hypothesis tests they get sometimes converted to some kind of Results classes with extra methods.
Design for inheritable Bunch/Holder/TestResults classes is still open.
(My Stata export
dofile defines new Holder classes each time.)N-Wouda commentedon Aug 24, 2018
All
class Bunchdefinitions 'out there' follow one of the following two templates, (i),And (ii),
I have some spare time and could consolidate this, i.a., into a proper class hierarchy, and then redirect current definitions to use one of the two classes. After that, I'm very willing to look at Hold(It/er) and TestResults, but that might not get done soon.
@josef-pkt @bashtage where'd you suggest to place the
Bunchdefinition in the code base? My initial thoughts were to create a new moduleparameter_objectsinsm/tools, which would then expose these classes.josef-pkt commentedon Aug 24, 2018
The problem is that I actually don't like
Bunchclasses (subclass of dict) anymore, i.e. I never use the dictionary access, and only like attribute access as in our Model Results classes.based on a file search:
tsa (Chad in newer code) uses them quite a bit, but imported:
from statsmodels.tools.tools import Bunchthere are some miscellaneous uses where a Bunch class is not always a Bunch(dict), but are just what I switched to calling Holder classes.
And there are many Bunch classes in Stata results, but those are part of the do file, i.e. autogenerated. (Those could be Holder classes because we only use attribute access AFAIK)
for test results as replacement of Bunch and Holder classes
#277 first open issue from 2012
#1182 initial discussion from 2013
with still no general outcome, just a lot more special cases