diff --git a/scripts/ml/combined_model/combined_model_iterator.py b/scripts/ml/combined_model/combined_model_iterator.py index ce1816f..5bb83a1 100644 --- a/scripts/ml/combined_model/combined_model_iterator.py +++ b/scripts/ml/combined_model/combined_model_iterator.py @@ -81,7 +81,7 @@ sys.path.append(homedir + '/git/LSHTM_analysis/scripts/ml/ml_functions') sys.path ############################################################################### #outdir = homedir + '/git/LSHTM_ML/output/combined/' -outdir = homedir + '/git/LSHTM_ML/output/test/' +outdir = homedir + '/git/LSHTM_ML/output/cg_oversample/' #==================== # Import ML functions @@ -264,7 +264,7 @@ def CMLogoSkf(cm_input_df , 'y_smnc_cm': y_smnc}) #%%:Running Multiple models on LOGO with SKF -# cD3_v2 = MultModelsCl_logo_skf(input_df = cm_X # two func were identical excpet for name +# cD3_v2 = MultModelsCl_logo_skf(input_df = cm_X # two func were identical excpet for name for i in sampling_names.keys(): print("thing:", "X"+i+"_cm", "y"+i+"_cm") @@ -289,14 +289,13 @@ def CMLogoSkf(cm_input_df , blind_test_target = cm_bts_y , return_formatted_output = True , random_state = 42 - , n_jobs = os.cpu_count() # the number of jobs should equal the number of CPU cores + , n_jobs = os.cpu_count() ) outFile = output_dir + str(n_tr_genes+1) + "genes_" + tts_split_type + '_' + file_suffix + i + ".csv" cD3_v2.to_csv(outFile) - # outDict.update({'X' : cm_X # , 'y' : cm_y # , 'X_bts' : cm_bts_X diff --git a/scripts/ml/combined_model/running_ml_scripts.txt b/scripts/ml/combined_model/running_ml_scripts.txt index 5c3793c..c9f2bb1 100644 --- a/scripts/ml/combined_model/running_ml_scripts.txt +++ b/scripts/ml/combined_model/running_ml_scripts.txt @@ -1,6 +1,8 @@ ######################################################################## # COMBINED Model - ######################################################################## - +# no resampling time ./cm_logo_skf.py 2>&1 | tee cm_skf-$(date --iso).log + +# with resampling +time ./combined_model_iterator.py 2>&1 | tee cm_iterator-$(date --iso).log