From 6ad226fe84e4bcd8790c35e746cbca46ade313e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Wed, 16 Dec 2020 11:38:25 +0100 Subject: [PATCH] Come back to multicore process --- experimentation/Experiments.py | 2 +- experimentation/Models.py | 1 + scripts/all.txt | 49 ++++++++++++++++++++++++++++ core.txt => scripts/core.txt | 4 +-- scripts/gennotcore.py | 18 ++++++++++ hardCore.txt => scripts/hardCore.txt | 4 +-- scripts/notCore.txt | 22 +++++++++++++ 7 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 scripts/all.txt rename core.txt => scripts/core.txt (97%) create mode 100644 scripts/gennotcore.py rename hardCore.txt => scripts/hardCore.txt (100%) create mode 100644 scripts/notCore.txt diff --git a/experimentation/Experiments.py b/experimentation/Experiments.py index 4ff2f2a..aa41337 100644 --- a/experimentation/Experiments.py +++ b/experimentation/Experiments.py @@ -123,7 +123,7 @@ class Experiment: model, return_train_score=True, param_grid=hyperparameters, - n_jobs=1, + n_jobs=-1, verbose=1, ) start_time = time.time() diff --git a/experimentation/Models.py b/experimentation/Models.py index 6935c7d..bb166d0 100644 --- a/experimentation/Models.py +++ b/experimentation/Models.py @@ -195,5 +195,6 @@ class ModelOdte(Ensemble): "max_samples": [0.2, 0.4, 0.8, 1.0], "n_estimators": [50, 100], "max_features": [0.2, 0.6, 1.0], + "n_jobs": [-1], } return super().get_parameters() diff --git a/scripts/all.txt b/scripts/all.txt new file mode 100644 index 0000000..4573d9f --- /dev/null +++ b/scripts/all.txt @@ -0,0 +1,49 @@ +balance-scale +balloons +breast-cancer-wisc-diag +breast-cancer-wisc-prog +breast-cancer-wisc +breast-cancer +cardiotocography-10clases +cardiotocography-3clases +conn-bench-sonar-mines-rocks +cylinder-bands +dermatology +echocardiogram +fertility +haberman-survival +heart-hungarian +hepatitis +ilpd-indian-liver +ionosphere +iris +led-display +libras +low-res-spect +lymphography +mammographic +molec-biol-promoter +musk-1 +oocytes_merluccius_nucleus_4d +oocytes_merluccius_states_2f +oocytes_trisopterus_nucleus_2f +oocytes_trisopterus_states_5b +parkinsons +pima +pittsburg-bridges-MATERIAL +pittsburg-bridges-REL-L +pittsburg-bridges-SPAN +pittsburg-bridges-T-OR-D +planning +post-operative +seeds +statlog-australian-credit +statlog-german-credit +statlog-heart +statlog-image +statlog-vehicle +synthetic-control +tic-tac-toe +vertebral-column-2clases +wine +zoo \ No newline at end of file diff --git a/core.txt b/scripts/core.txt similarity index 97% rename from core.txt rename to scripts/core.txt index 9f7a560..b2fc681 100644 --- a/core.txt +++ b/scripts/core.txt @@ -1,5 +1,5 @@ -breast-cancer-wisc-diag balance-scale +breast-cancer-wisc-diag breast-cancer-wisc-prog cardiotocography-10clases cardiotocography-3clases @@ -18,4 +18,4 @@ statlog-australian-credit statlog-german-credit statlog-image statlog-vehicle -tic-tac-toe +tic-tac-toe \ No newline at end of file diff --git a/scripts/gennotcore.py b/scripts/gennotcore.py new file mode 100644 index 0000000..026876d --- /dev/null +++ b/scripts/gennotcore.py @@ -0,0 +1,18 @@ +f = open("core.txt", "r") +core = f.read().splitlines() +f.close() +f = open("hardCore.txt", "r") +hardCore = f.read().splitlines() +f.close() +f = open("all.txt", "r") +notCore_tmp = f.read().splitlines() +f.close() +notCore = list() +a = 0 +f = open("notCore.txt", "w") +for name in notCore_tmp: + if name not in core and name not in hardCore: + a += 1 + print(a, name) + print(name, file=f) +f.close() diff --git a/hardCore.txt b/scripts/hardCore.txt similarity index 100% rename from hardCore.txt rename to scripts/hardCore.txt index 68cc89d..631e5d7 100644 --- a/hardCore.txt +++ b/scripts/hardCore.txt @@ -1,6 +1,6 @@ -molec-biol-promoter -musk-1 conn-bench-sonar-mines-rocks libras low-res-spect +molec-biol-promoter +musk-1 synthetic-control \ No newline at end of file diff --git a/scripts/notCore.txt b/scripts/notCore.txt new file mode 100644 index 0000000..96f8191 --- /dev/null +++ b/scripts/notCore.txt @@ -0,0 +1,22 @@ +balloons +breast-cancer-wisc +breast-cancer +echocardiogram +fertility +haberman-survival +heart-hungarian +hepatitis +iris +lymphography +parkinsons +pittsburg-bridges-MATERIAL +pittsburg-bridges-REL-L +pittsburg-bridges-SPAN +pittsburg-bridges-T-OR-D +planning +post-operative +seeds +statlog-heart +vertebral-column-2clases +wine +zoo \ No newline at end of file