-
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
Revamp survival analysis interface #842
Conversation
This is not a finished PR, but a starting point for a discussion. The Weibull_aft and log_logistic_aft model summaries include multi index rows. The question is, if we can reduce them and how that works with the limitations of the adata.var. We were hoping to include all the summary data into the adata, so as to have a similar style as scanpy. |
Do this for:
|
just a quick write-down of our offline discussion: indeed, I think this is the best way to go from here if we do want to offer nice plots as request in the linked issue. It is required that we store the survival analysis results in the However it can't be stored in storing the summary results of the fitter as a very basic DataFrame in |
Allows to pass keywords as requested in #744. Does not finish off this issue though, as ideally also show in a notebook tutorial later what effect regularization has. |
From my side good. @Zethson, request your review here as this a quite specific choice we're making here. |
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.
Great! Just minor points.
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
Co-authored-by: Lukas Heumos <[email protected]>
…tions for customizable storage in AnnData object
…ata to assertion method
Fixes #840
This pull request includes refactoring and enhancements to the survival analysis tools, particularly focusing on the Cox Proportional Hazards (CoxPH), Weibull Accelerated Failure Time (Weibull AFT), and Log-Logistic Accelerated Failure Time (Log-Logistic AFT) models. The changes improve the flexibility and usability of these models by adding new parameters and restructuring the code.
Refactoring and Enhancements:
Code Refactoring:
_regression_model
function into two separate functions:_regression_model_data_frame_preparation
and_regression_model_populate_adata
.Cox Proportional Hazards Model:
cox_ph
function to provide more control over the model fitting process, such asinplace
,key_added_prefix
,alpha
,label
,baseline_estimation_method
,penalizer
,l1_ratio
,strata
,n_baseline_knots
,knots
,breakpoints
,weights_col
,cluster_col
,robust
,formula
,batch_mode
,show_progress
,initial_point
, andfit_options
.Weibull Accelerated Failure Time Model:
weibull_aft
function with additional parameters similar to those added to thecox_ph
function.Log-Logistic Accelerated Failure Time Model:
log_logistic_aft
function to include new parameters.Testing Adjustments:
_sa_func_test
method intests/tools/test_sa.py
to accommodate the updated function signatures, ensuring that tests pass with the new parameters.