batchglm
batchglm copied to clipboard
Nicer model initialisation
Need to discuss how we handle this: https://github.com/theislab/batchglm/blob/604823001e81fdab232fe27dc59dab8d506ea020/batchglm/models/base_glm/model.py#L66-L82
There are basically three options in my opinion:
- Remove
InputDataGLMentirely: We only use it as a container now that does some type checks in the beginning which we could do statically inutilsanyway. - Keep
InputDataGLMand reference the attributes in the model properties, i.e.model.input_data.<attribute>when callingmodel.attribute - override
model.__getattr__like so:def __getattr__(self, attr: str): return self.input_data.__getattribute__(attr)
I'm in favour of 2 but as a way in between to keep this support, maybe 3 would be an elegant solution for now.
Please advise @ilan-gold @davidsebfischer
What does 2 allow that 3 doesn't? Not sure I follow the what you mean by "keep this support"
Sorry I meant 1. 2 would probably be cleaner than 3 but other than that not really a different as in both casese input_data is a model attribute