minor changes to run combined_model
This commit is contained in:
parent
057c98c2f1
commit
350be30f19
3 changed files with 13 additions and 22 deletions
|
@ -172,26 +172,25 @@ def CMLogoSkf(cm_input_df
|
||||||
cm_bts_y = cm_test_df.loc[:, target_var]
|
cm_bts_y = cm_test_df.loc[:, target_var]
|
||||||
|
|
||||||
print('\nTEST data dim:' , cm_bts_X.shape
|
print('\nTEST data dim:' , cm_bts_X.shape
|
||||||
, '\nTEST Target dim:', cm_bts_y.shape)
|
, '\nTEST Target dim:' , cm_bts_y.shape)
|
||||||
|
|
||||||
print("Running Multiple models on LOGO with SKF")
|
print("Running Multiple models on LOGO with SKF")
|
||||||
#%%:Running Multiple models on LOGO with SKF
|
#%%:Running Multiple models on LOGO with SKF
|
||||||
cD3_v2 = MultModelsCl_logo_skf(input_df = cm_X
|
cD3_v2 = MultModelsCl_logo_skf(input_df = cm_X
|
||||||
, target = cm_y
|
, target = cm_y
|
||||||
#, group = 'none'
|
|
||||||
, sel_cv = skf_cv
|
, sel_cv = skf_cv
|
||||||
|
|
||||||
, blind_test_df = cm_bts_X
|
|
||||||
, blind_test_target = cm_bts_y
|
|
||||||
|
|
||||||
, tts_split_type = tts_split_type
|
, tts_split_type = tts_split_type
|
||||||
|
|
||||||
, resampling_type = 'none' # default
|
, resampling_type = 'none' # default
|
||||||
|
#, group = 'none'
|
||||||
|
|
||||||
, add_cm = True
|
, add_cm = True
|
||||||
, add_yn = True
|
, add_yn = True
|
||||||
, var_type = 'mixed'
|
, var_type = 'mixed'
|
||||||
|
, scale_numeric = ['min_max']
|
||||||
, run_blind_test = True
|
, run_blind_test = True
|
||||||
|
, blind_test_df = cm_bts_X
|
||||||
|
, blind_test_target = cm_bts_y
|
||||||
|
|
||||||
, return_formatted_output = True
|
, return_formatted_output = True
|
||||||
, random_state = 42
|
, random_state = 42
|
||||||
, n_jobs = os.cpu_count() # the number of jobs should equal the number of CPU cores
|
, n_jobs = os.cpu_count() # the number of jobs should equal the number of CPU cores
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
|
# COMBINED Model
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
time ./cm_logo_skf.py 2>&1 | tee log_cm_skf.txt
|
time ./cm_logo_skf.py 2>&1 | tee cm_skf-$(date --iso).log
|
||||||
|
|
||||||
|
|
|
@ -91,9 +91,10 @@ scoring_fn = ({ 'mcc' : make_scorer(matthews_corrcoef)
|
||||||
, 'jcc' : make_scorer(jaccard_score)
|
, 'jcc' : make_scorer(jaccard_score)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# for sel_cv
|
||||||
#skf_cv = StratifiedKFold(n_splits = 10
|
#skf_cv = StratifiedKFold(n_splits = 10
|
||||||
# #, shuffle = False, random_state= None)
|
# #, shuffle = False, random_state= None)
|
||||||
# , shuffle = True,**rs)
|
# , shuffle = True, **rs)
|
||||||
|
|
||||||
#rskf_cv = RepeatedStratifiedKFold(n_splits = 10
|
#rskf_cv = RepeatedStratifiedKFold(n_splits = 10
|
||||||
# , n_repeats = 3
|
# , n_repeats = 3
|
||||||
|
@ -189,14 +190,6 @@ def MultModelsCl_logo_skf(input_df
|
||||||
rs = {'random_state': random_state}
|
rs = {'random_state': random_state}
|
||||||
njobs = {'n_jobs': n_jobs}
|
njobs = {'n_jobs': n_jobs}
|
||||||
|
|
||||||
skf_cv = StratifiedKFold(n_splits = 10
|
|
||||||
#, shuffle = False, random_state= None)
|
|
||||||
, shuffle = True,**rs)
|
|
||||||
|
|
||||||
rskf_cv = RepeatedStratifiedKFold(n_splits = 10
|
|
||||||
, n_repeats = 3
|
|
||||||
, **rs)
|
|
||||||
logo = LeaveOneGroupOut()
|
|
||||||
|
|
||||||
# select CV type:
|
# select CV type:
|
||||||
# if group == None:
|
# if group == None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue