diff --git a/setup.py b/setup.py index f3c7513..2a32811 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="kfre", - version="0.1.8a", + version="0.1.8a1", author="Leonid Shpaner", author_email="lshpaner@ucla.edu", description="A Python library for estimating kidney failure risk using the KFRE model developed by Tangri et al.", diff --git a/src/kfre/__init__.py b/src/kfre/__init__.py index 60a8b39..879ecb3 100644 --- a/src/kfre/__init__.py +++ b/src/kfre/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.1.8a" +__version__ = "0.1.8a1" from .main import * @@ -61,8 +61,8 @@ def kfre_person( "perform_conversions", "add_kfre_risk_col", "RiskPredictor", - "calculate_outcome", - "classify_ckd_stages", - "prep_and_plot_metrics_vars", - "calculate_metrics_for_n_var", + "calc_esrd_outcome", + "class_ckd_stages", + "plot_kfre_metrics", + "eval_kfre_metrics", ] diff --git a/src/kfre/perform_eval.py b/src/kfre/perform_eval.py index c0ca154..fff8d41 100644 --- a/src/kfre/perform_eval.py +++ b/src/kfre/perform_eval.py @@ -20,7 +20,7 @@ ################################################################################ -def calculate_outcome(df, col, years, duration_col, prefix=None): +def calc_esrd_outcome(df, col, years, duration_col, prefix=None): """Calculate outcome based on a given number of years. This function creates a new column in the dataframe which is populated with @@ -53,7 +53,7 @@ def calculate_outcome(df, col, years, duration_col, prefix=None): ################################################################################ -def classify_ckd_stages( +def class_ckd_stages( df, egfr_col="eGFR", stage_col=None, @@ -95,7 +95,7 @@ def classify_ckd_stages( ] # Create a new column in the DataFrame - df[stage_col] = np.select(conditions, choices, default="Not classified") + df[stage_col] = np.select(conditions, choices, default="Not Classified") if combined_stage_col: # Combine conditions for CKD stages 3, 4, and 5 according to eGFR values @@ -106,7 +106,7 @@ def classify_ckd_stages( # Create a new column in the DataFrame df[combined_stage_col] = np.select( - [combined_conditions], combined_choices, default="Not classified" + [combined_conditions], combined_choices, default="Not Classified" ) return df @@ -117,7 +117,7 @@ def classify_ckd_stages( ################################################################################ -def prep_and_plot_metrics_vars( +def plot_kfre_metrics( df, num_vars, fig_size=(12, 6), @@ -524,7 +524,7 @@ def prep_and_plot_metrics_vars( ################################################################################ -def calculate_metrics_for_n_var(df, n_var_list): +def eval_kfre_metrics(df, n_var_list): """ Calculate metrics for multiple outcomes and store the results in a DataFrame.