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
We currently carry around some data that might not be strictly necessary. E.g., orig_endog, orig_exog, etc. We probably shouldn't do this by default. We should also make the attached data instance the first-class citizen and have endog, exog, etc. only has properties of the models that point to the data attributes.
I'm not sure what you have in mind.
In general we carry around references and don't copy the data, which means users can take advantage of this. What are the cases where orig_endog and orig_exog are separate arrays? Most likely in some cases where they are pandas Dataframes that are not float. ?
patsy doesn't give us the original DataFrame, does it?
Same for endog, exog. AFAICS, endog exog are references, and they are convenient being attached to the model.
I think I prefer to keep data out of the user interface. That would be another layer to learn and keep track of, and it makes it more difficult to have without_data models. (BigOLS, ...)
Anytime we have any missing data handling or pass a pandas object in to a
model we carry around a reference to the original data which is different,
which strikes me as unnecessary. We're actually using the original data
internally in a few models, so that will need to be cleaned up.
I also don't think there's ever any reason to have a user interact directly
with the data object.
Ok, we might only need a few things, like the row labels (index) from the original data, and could throw away the rest.
I haven't looked at MICE in a while and don't remember how the missing indices/values are stored.
Related: I think we mentioned somewhere else that we could also drop the caching of some attributes. I don't think we need to store all the residuals in GLM. (But here also it's the choice of the user, if an attribute is never accessed it isn't cached, which is relevant for batch processing when we just want a few results or predictions.)
On the other hand, we might need some "flags" and user options for lower memory. I'm thinking of attaching auxiliary regression results so they can be reused by the results. For example, GLM and RLM don't attach currently the last WLS regression which should be useful for diagnostic analysis.
Activity
josef-pkt commentedon Dec 5, 2014
I'm not sure what you have in mind.
In general we carry around references and don't copy the data, which means users can take advantage of this. What are the cases where orig_endog and orig_exog are separate arrays? Most likely in some cases where they are pandas Dataframes that are not float. ?
patsy doesn't give us the original DataFrame, does it?
Same for endog, exog. AFAICS, endog exog are references, and they are convenient being attached to the model.
I think I prefer to keep
dataout of the user interface. That would be another layer to learn and keep track of, and it makes it more difficult to havewithout_datamodels. (BigOLS, ...)jseabold commentedon Dec 5, 2014
Anytime we have any missing data handling or pass a pandas object in to a
model we carry around a reference to the original data which is different,
which strikes me as unnecessary. We're actually using the original data
internally in a few models, so that will need to be cleaned up.
I also don't think there's ever any reason to have a user interact directly
with the data object.
josef-pkt commentedon Dec 5, 2014
Ok, we might only need a few things, like the row labels (index) from the original data, and could throw away the rest.
I haven't looked at MICE in a while and don't remember how the
missingindices/values are stored.Related: I think we mentioned somewhere else that we could also drop the caching of some attributes. I don't think we need to store all the residuals in GLM. (But here also it's the choice of the user, if an attribute is never accessed it isn't cached, which is relevant for batch processing when we just want a few results or predictions.)
On the other hand, we might need some "flags" and user options for lower memory. I'm thinking of attaching auxiliary regression results so they can be reused by the results. For example, GLM and RLM don't attach currently the last WLS regression which should be useful for
diagnosticanalysis.josef-pkt commentedon Dec 18, 2014
I was just looking at the wrapper to see how row_labels work.
It gets them from
data.orig_exogordata.orig_endog. The index is not copied anytime before usage in wrap output, AFAICS.ModelData.rowlabels