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

Enhancement/issue 840 #842

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Enhancement/issue 840 #842

wants to merge 6 commits into from

Conversation

aGuyLearning
Copy link
Collaborator

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:

    • Split the _regression_model function into two separate functions: _regression_model_data_frame_preparation and _regression_model_populate_adata.
  • Cox Proportional Hazards Model:

    • Added new parameters to the cox_ph function to provide more control over the model fitting process, such as inplace, 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, and fit_options.
  • Weibull Accelerated Failure Time Model:

    • Enhanced the weibull_aft function with additional parameters similar to those added to the cox_ph function.
  • Log-Logistic Accelerated Failure Time Model:

    • Updated the log_logistic_aft function to include new parameters.
  • Testing Adjustments:

    • Modified the _sa_func_test method in tests/tools/test_sa.py to accommodate the updated function signatures, ensuring that tests pass with the new parameters.

@aGuyLearning aGuyLearning linked an issue Dec 20, 2024 that may be closed by this pull request
13 tasks
@aGuyLearning aGuyLearning requested a review from eroell December 20, 2024 10:36
@aGuyLearning
Copy link
Collaborator Author

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.

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

Successfully merging this pull request may close these issues.

Update survival analysis regression models
2 participants