Skip to content

Commit

Permalink
1. Run experiments for article of nonparametric modification
Browse files Browse the repository at this point in the history
  • Loading branch information
iuliivasilev committed Jun 21, 2024
1 parent 4e757c1 commit 053100a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions tests/PARAMS/SCHEME_PARAM.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"criterion": ["peto", "tarone-ware", "wilcoxon", "logrank"], # "ibswei", "maxcombo",
"min_samples_leaf": [0.05, 0.01, 0.001],
"l_reg": [0, 0.01, 0.1, 0.5, 0.9], # [0, 0.001, 0.01, 0.1, 0.2]
"leaf_model": ["base_zero_after"],
"leaf_model": ["base_meaning"], # , "base_zero_after"
'cut': [False], # True,
"woe": [True],
"signif": [0.05, 0.1, 1.0],
Expand All @@ -16,7 +16,7 @@
"size_sample": [0.3, 0.5, 0.7, 1.0], # 0.7
"n_estimators": [50],
"depth": [7], # 15
"l_reg": [0, 0.01, 0.1, 0.5, 0.9],
"l_reg": [0], # 0.01, 0.1, 0.5, 0.9],
"ens_metric_name": ["IBS_REMAIN"], # ["bic", "roc", "ibs"], "IBS_WW", "IBS_REMAIN"
"criterion": ["peto", "tarone-ware", "wilcoxon", "logrank"], # "ibswei",
"leaf_model": ["base_zero_after"], # ["base_fast", "base_zero_after"]
Expand Down Expand Up @@ -87,7 +87,7 @@
"size_sample": [0.5, 1.0], # 0.7
"n_estimators": [50],
"depth": [7], # 10
"l_reg": [0, 0.01, 0.1, 0.5, 0.9],
"l_reg": [0], # 0.01, 0.1, 0.5, 0.9],
"ens_metric_name": ["IBS"],
"criterion": ["peto", "tarone-ware", "wilcoxon", "logrank"], # "symm_peto",
"leaf_model": ["base_zero_after"], # "base_fast"
Expand Down
26 changes: 13 additions & 13 deletions tests/test_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def dir_path():
# )

@pytest.mark.parametrize(
"best_metric", ["LOGLIKELIHOOD"] # ["IBS_REMAIN"], ["CI", "CI_CENS", "LOGLIKELIHOOD", "IBS", "IBS_WW", "IBS_REMAIN", "IAUC_WW_TI", "AUPRC"]
"best_metric", ["IBS_REMAIN"] # ["IBS_REMAIN"], ["CI", "CI_CENS", "LOGLIKELIHOOD", "IBS", "IBS_WW", "IBS_REMAIN", "IAUC_WW_TI", "AUPRC"]
)
# @pytest.mark.parametrize(
# "mode_wei", ["exp", "sigmoid", "linear"] # "exp", "sigmoid"
Expand All @@ -263,25 +263,25 @@ def test_dataset_exp(dir_path, dataset, best_metric, bins_sch="origin", mode="CV

# prefix = f"{best_metric}_STRATTIME+_PARBSTR_test_wide_{bins_sch}"

# prefix = f"{best_metric}_STRATTIME+_EXT10_EQ_REG_TREE_ALL_BINS_{bins_sch}"
prefix = f"{best_metric}_STRATTIME+_EXT10_MEAN_EQ_REG_TREE_ALL_BINS_{bins_sch}"
# prefix = f"{best_metric}_STRATTIME+_EXT10_NORMAL_EQ_REG_TREE_ALL_BINS_{bins_sch}"

# prefix = f"{best_metric}_PARBSTR"
# prefix = f"{best_metric}_STRATTIME+_EXT10_NORMAL_EQ_REG_PAR_BSTR_ALL_BINS_{bins_sch}"
# prefix = f"{best_metric}_STRATTIME+_EXT10_NORMAL_EQ_REG_CLEVERBOOST_ALL_BINS_{bins_sch}"
# prefix = f"{best_metric}_STRATTIME+_EXT10_NORMAL_EQ_REG_{mode_wei}_reg(0_01)_PART_BOOST_ALL_BINS_{bins_sch}"

prefix = f"{best_metric}_STRATTIME+_scsurv_extended_no_scale" # "scsurv", "bstr_full_WB", SHORT_CNT_DIFF_
res_exp = run(dataset, with_self=[], with_external=True, mode=mode,
# dir_path=dir_path+"\\",
bins_sch=bins_sch, best_metric=best_metric) # Only scikit-survival

# storage_path = os.path.join("D:", os.sep, "Vasilev", "SA", dataset)
# if not os.path.exists(storage_path):
# os.makedirs(storage_path)
# res_exp = run(dataset, with_self=["PARBSTR"], with_external=False, mode=mode, # CLEVERBOOST
# # dir_path=storage_path+"\\",
# bins_sch=bins_sch, best_metric=best_metric, mode_wei=mode_wei) # ["TREE", "BSTR", "BOOST"]
# prefix = f"{best_metric}_STRATTIME+_scsurv_extended_no_scale" # "scsurv", "bstr_full_WB", SHORT_CNT_DIFF_
# res_exp = run(dataset, with_self=[], with_external=True, mode=mode,
# # dir_path=dir_path+"\\",
# bins_sch=bins_sch, best_metric=best_metric) # Only scikit-survival

storage_path = os.path.join("D:", os.sep, "Vasilev", "SA", dataset)
if not os.path.exists(storage_path):
os.makedirs(storage_path)
res_exp = run(dataset, with_self=["TREE"], with_external=False, mode=mode, # CLEVERBOOST
# dir_path=storage_path+"\\",
bins_sch=bins_sch, best_metric=best_metric, mode_wei=mode_wei) # ["TREE", "PARBSTR", "BSTR", "BOOST"]

df_full = res_exp.get_result()
df_criterion = res_exp.get_best_by_mode(stratify="criterion")
Expand Down

0 comments on commit 053100a

Please sign in to comment.