Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
survival2: incomplete refactoring, input/data format? #223
I did the necessary changes to get ex_kaplan_meier.py to work
the example uses a string array for exog, and cast partially internally. This is fragile,
the earlier format used indices into the data array as argument, now a Survival instance, and for exog an array is required.
stratification assigns groups/strata by equality of floating numbers. This might be fragile, but we could just alert the user.
KMResults.normalized_cov_params in example is 1d ?
no tests, needs at least sanity checks to keep the different parts up-to-date through refactorings
long methods, and long if statements indicate that some outsourcing would improve the structure.
Overall survival2.py has a lot of features, and looks like it could be already used. Main problem are that there are not tests.
class structure overall looks fine, nice to have plots to show results
I mainly went through to check for refactoring bugs, especially to check the status after the rebase, and haven't looked at the content in detail yet.
We might want to have a WIP PR, pull request for Work in Progress, as scikit-learn does, for easier commenting on the code.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
I added a few TODOs to the source at spots where I saw problems
general: cache some attributes or method results, use cache decorator, currently calculations are repeated
CoxPH.summary prints instead of returns