-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve survival analysis interface #825
Conversation
Thanks a lot @aGuyLearning, awesome! Comments as per review :) |
ehrapy/tools/_sa.py
Outdated
model = model_class() | ||
model.fit(T, event_observed=E) | ||
model.fit( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add fit_left_censoring
call upon argument input left
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if nelson-aalen gracefully crashes with meaningful error message
- removed kwargs - updated documentation
On a sidenote: having a descriptive PR title is better here - the titles end up in the changelog, forgot to mention |
imblearn maintenance for sklearn usage (failing test) which @aGuyLearning noted is on the way btw |
… function in line with new signature
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
FYI: I merged main into this PR because I fixed the RTD build. |
Objections to lifeline's intersphinx mappings @Zethson? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably remove the kmf
import in tools and just alias it but it's NBD
Description of changes
closes #822
Changed the method signature of univariate models to allow the user to pass parameters to the lifeline. Now weilbull, neil_aalen and kmf look like
adata: AnnData, duration_col: str, event_col: str, **kwargs
and are passed on to the _univariate_model function
Technical details
this could be changed to explicitly have all parameters in each function and pass them on.
Additional context