Repository navigation
Demonstrate idea for _results_class property - #3877
jbrockmendel wants to merge 1 commit into
Conversation
|
No apparent interest. Closing. |
|
Looks like something similar was implemented in |
|
I thought we had used this somewhere before but my github search comes up empty, i.e. I don't remember where this came from and there should (?) be an issue open two benefits
to the first: This only works if the individual to the second: right now the result creation in fit via mlefit works from base to the final model. If base.LikelihoodModel already creates the correct results class, then we skip the top to bottom sequence. I guess that shouldn't be a problem, but needs to be tried out and checked. In any case, it might not be possible to mix the two So my guess is that it is still tricky to go much higher up with this in the hierarchy, even though I think it would make the BinaryModel would be a similar candidate as ZeroInflated that should be relatively straight forward, except I just opened an issue why MultinomialModel subclasses BinaryModel which AFAICS doesn't add anything and makes the code or class hierarchy more complicated than needed. (For other cases like fit_constrained we have the additional problem of needing to retrofit the results instance. I the full results instance is created higher up in the hierarchy, then it will be more difficult to add additional keywords to |
|
Today has been exhausting. I'm going to learn to love duplicate code, embrace FUD. |
|
(to end an exhausting day) One item I remembered and agree with: and one of the Zen's (It's all trade-offs, based on pretty diffuse priors with only partially identified likelihoods :) |
Holy spin-kicking jehosaphat. [deep breath]. [count to 100]. I have not been advocating breaking any [expletive deleted] rules. Suggesting that we should fix SyntaxErrors before users report them is not about "purity". Suggesting that NameErrors waiting to happen might worth addressing is not "overly clever". The onboarding cost for a potential contributor is positively related to the size of the codebase. The cognitive burden for existing contributors/maintainers is positively related to the size of the codebase. Suggesting that there is a cost to keeping around code that can do nothing but raise RuntimeErrors, that no one uses and never will, that are pure clutter[...] and offering to fix these things is not a "stupid code golf trick", and may His Noodly Appendage strike down anyone who says otherwise. Not long ago I found myself trying to track down the difference between You've won. You've broken my spirit. But please don't frakkin high-road me. |
|
My last comment was about our code, not about you. Sorry, if I didn't say this well enough. Our code is breaking some "programming rules", either because we have a locally good solution, but nor enough global consistency yet, or because we don't know yet what the global rules/patterns are supposed to be, or because breaking programming rules in our code is "practical". (The overall size of the code base is irrelevant as long as we can concentrate on the parts that are relevant for specific developments.) |
|
(Overall size does matter however. I proposed topic weeks to reduce my "cognitive overload" from having too many issues on too many different topics that need more than superficial attention.) |
This is not intended as a real PR, but a demonstration of an idea to discuss.
It would be helpful to be able to associate a
Modelsubclass with the appropriateResultsandResultsWrappersubclasses. (In some cases there are also L1 variants of these classes, presumably a long tail of other cases I'm forgetting). The obvious option is not viable:because in most cases
SomeModelResultsis not yet defined. We could change that by shifting stuff around, but the option I'm leaning towards is based onpandas_constructorproperty:The upshot of this is that we can unify a bunch of wrapping logic and move things up the class hierarchy. I did a quick pass at demonstrating this for
MLEModelandDiscreteModelfor this PR.#noci