Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor prep_data functions (& formulas.py) #74

Open
4 tasks
jburos opened this issue Sep 5, 2018 · 0 comments
Open
4 tasks

refactor prep_data functions (& formulas.py) #74

jburos opened this issue Sep 5, 2018 · 0 comments

Comments

@jburos
Copy link
Member

jburos commented Sep 5, 2018

In part inspired by feedback from @julia326 & @armish, making a list of unresolved code questions.

Within [survivalstan/formulas.py]:

  • re: timepoint_id = 'id'

    are these safe defaults to have, and would they ever be different values? in general, there are a lot of string constant names throughout the code - is there an initial validation you can run to make sure the columns exist by the names you expect to see?

  • re: self._type = "wide"

    I see you doing these wide/long checks throughout the code and it might make it harder to maintain/improve this code, if, for example, you have to add support for a new type for some peculiar reason (if that is unlikely, then just ignore this comment). Maybe these checks can benefit from the recent enum support in Python?

  • re: Class Survdata(pd.DataFrame)

    Do you think would it make the code easier to read if you have SurvData as a base/utility class and WideSurvData and LongSurvData extending it to populate survival_type?

  • re: def len(self):

    can this get called before memorize_finish()?

@jburos jburos changed the title refactor prep_data functions refactor prep_data functions (& formulas.py) Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant