Former-commit-id: 8c12891265
master
Angelos Chatzimparmpas 4 years ago
parent 16e8558351
commit e4b65e4459
  1. 700
      breast-cancer-wisconsin.csv
  2. 1
      cache_dir/joblib/run/EnsembleModel/6cfa19bb450bfb5dfa3fc39dbc8aa77e/metadata.json
  3. 1
      cache_dir/joblib/run/EnsembleModel/6cfa19bb450bfb5dfa3fc39dbc8aa77e/output.pkl
  4. 54
      cache_dir/joblib/run/EnsembleModel/func_code.py
  5. 1
      cache_dir/joblib/run/GridSearch/4b9f779431c047e8a87f8756bac85d64/metadata.json
  6. BIN
      cache_dir/joblib/run/GridSearch/4b9f779431c047e8a87f8756bac85d64/output.pkl
  7. 1
      cache_dir/joblib/run/GridSearch/a32924a20c3a8483b7f841d3c9c7508f/metadata.json
  8. BIN
      cache_dir/joblib/run/GridSearch/a32924a20c3a8483b7f841d3c9c7508f/output.pkl
  9. 51
      cache_dir/joblib/run/GridSearch/func_code.py
  10. 1
      cache_dir/joblib/run/GridSearchForModels/6ca078b89780ce51f8c908be394b0a91/metadata.json
  11. BIN
      cache_dir/joblib/run/GridSearchForModels/6ca078b89780ce51f8c908be394b0a91/output.pkl
  12. 1
      cache_dir/joblib/run/GridSearchForModels/b32ac658efc96fe80763fbc6cdd8559c/metadata.json
  13. BIN
      cache_dir/joblib/run/GridSearchForModels/b32ac658efc96fe80763fbc6cdd8559c/output.pkl
  14. 96
      cache_dir/joblib/run/GridSearchForModels/func_code.py
  15. 1
      cache_dir/joblib/run/GridSearchForParameters/6ca078b89780ce51f8c908be394b0a91/metadata.json
  16. BIN
      cache_dir/joblib/run/GridSearchForParameters/6ca078b89780ce51f8c908be394b0a91/output.pkl
  17. 1
      cache_dir/joblib/run/GridSearchForParameters/b32ac658efc96fe80763fbc6cdd8559c/metadata.json
  18. BIN
      cache_dir/joblib/run/GridSearchForParameters/b32ac658efc96fe80763fbc6cdd8559c/output.pkl
  19. 76
      cache_dir/joblib/run/GridSearchForParameters/func_code.py
  20. 1
      cache_dir/joblib/run/InitializeEnsemble/72a755383fba437e4dead6ff3e3d81e3/metadata.json
  21. BIN
      cache_dir/joblib/run/InitializeEnsemble/72a755383fba437e4dead6ff3e3d81e3/output.pkl
  22. 105
      cache_dir/joblib/run/InitializeEnsemble/func_code.py
  23. BIN
      insertMongo.pyc

@ -1,700 +0,0 @@
clump_thic,size_un,shape_un,marg_adh,epith_size,bare_nuc,bland_chr,nor_nuc,mitoses,class*
5,1,1,1,2,1,3,1,1,Benign
5,4,4,5,7,10,3,2,1,Benign
3,1,1,1,2,2,3,1,1,Benign
6,8,8,1,3,4,3,7,1,Benign
4,1,1,3,2,1,3,1,1,Benign
8,10,10,8,7,10,9,7,1,Malignant
1,1,1,1,2,10,3,1,1,Benign
2,1,2,1,2,1,3,1,1,Benign
2,1,1,1,2,1,1,1,5,Benign
4,2,1,1,2,1,2,1,1,Benign
1,1,1,1,1,1,3,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
5,3,3,3,2,3,4,4,1,Malignant
1,1,1,1,2,3,3,1,1,Benign
8,7,5,10,7,9,5,5,4,Malignant
7,4,6,4,6,1,4,3,1,Malignant
4,1,1,1,2,1,2,1,1,Benign
4,1,1,1,2,1,3,1,1,Benign
10,7,7,6,4,10,4,1,2,Malignant
6,1,1,1,2,1,3,1,1,Benign
7,3,2,10,5,10,5,4,4,Malignant
10,5,5,3,6,7,7,10,1,Malignant
3,1,1,1,2,1,2,1,1,Benign
8,4,5,1,2,4,7,3,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
5,2,3,4,2,7,3,6,1,Malignant
3,2,1,1,1,1,2,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
1,1,3,1,2,1,1,1,1,Benign
3,1,1,1,1,1,2,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
10,7,7,3,8,5,7,4,3,Malignant
2,1,1,2,2,1,3,1,1,Benign
3,1,2,1,2,1,2,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
10,10,10,8,6,1,8,9,1,Malignant
6,2,1,1,1,1,7,1,1,Benign
5,4,4,9,2,10,5,6,1,Malignant
2,5,3,3,6,7,7,5,1,Malignant
6,6,6,9,6,4,7,8,1,Benign
10,4,3,1,3,3,6,5,2,Malignant
6,10,10,2,8,10,7,3,3,Malignant
5,6,5,6,10,1,3,1,1,Malignant
10,10,10,4,8,1,8,10,1,Malignant
1,1,1,1,2,1,2,1,2,Benign
3,7,7,4,4,9,4,8,1,Malignant
1,1,1,1,2,1,2,1,1,Benign
4,1,1,3,2,1,3,1,1,Benign
7,8,7,2,4,8,3,8,2,Malignant
9,5,8,1,2,3,2,1,5,Malignant
5,3,3,4,2,4,3,4,1,Malignant
10,3,6,2,3,5,4,10,2,Malignant
5,5,5,8,10,8,7,3,7,Malignant
10,5,5,6,8,8,7,1,1,Malignant
10,6,6,3,4,5,3,6,1,Malignant
8,10,10,1,3,6,3,9,1,Malignant
8,2,4,1,5,1,5,4,4,Malignant
5,2,3,1,6,10,5,1,1,Malignant
9,5,5,2,2,2,5,1,1,Malignant
5,3,5,5,3,3,4,10,1,Malignant
1,1,1,1,2,2,2,1,1,Benign
9,10,10,1,10,8,3,3,1,Malignant
6,3,4,1,5,2,3,9,1,Malignant
1,1,1,1,2,1,2,1,1,Benign
10,4,2,1,3,2,4,3,10,Malignant
4,1,1,1,2,1,3,1,1,Benign
5,3,4,1,8,10,4,9,1,Malignant
8,3,8,3,4,9,8,9,8,Malignant
1,1,1,1,2,1,3,2,1,Benign
5,1,3,1,2,1,2,1,1,Benign
6,10,2,8,10,2,7,8,10,Malignant
1,3,3,2,2,1,7,2,1,Benign
9,4,5,10,6,10,4,8,1,Malignant
10,6,4,1,3,4,3,2,3,Malignant
1,1,2,1,2,2,4,2,1,Benign
1,1,4,1,2,1,2,1,1,Benign
5,3,1,2,2,1,2,1,1,Benign
3,1,1,1,2,3,3,1,1,Benign
2,1,1,1,3,1,2,1,1,Benign
2,2,2,1,1,1,7,1,1,Benign
4,1,1,2,2,1,2,1,1,Benign
5,2,1,1,2,1,3,1,1,Benign
3,1,1,1,2,2,7,1,1,Benign
3,5,7,8,8,9,7,10,7,Malignant
5,10,6,1,10,4,4,10,10,Malignant
3,3,6,4,5,8,4,4,1,Malignant
3,6,6,6,5,10,6,8,3,Malignant
4,1,1,1,2,1,3,1,1,Benign
2,1,1,2,3,1,2,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
3,1,1,2,2,1,1,1,1,Benign
4,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
2,1,1,2,2,1,1,1,1,Benign
5,1,1,1,2,1,3,1,1,Benign
9,6,9,2,10,6,2,9,10,Malignant
7,5,6,10,5,10,7,9,4,Malignant
10,3,5,1,10,5,3,10,2,Malignant
2,3,4,4,2,5,2,5,1,Malignant
4,1,2,1,2,1,3,1,1,Benign
8,2,3,1,6,3,7,1,1,Malignant
10,10,10,10,10,1,8,8,8,Malignant
7,3,4,4,3,3,3,2,7,Malignant
10,10,10,8,2,10,4,1,1,Malignant
1,6,8,10,8,10,5,7,1,Malignant
1,1,1,1,2,1,2,3,1,Benign
6,5,4,4,3,9,7,8,3,Malignant
1,3,1,2,2,2,5,3,2,Benign
8,6,4,3,5,9,3,1,1,Malignant
10,3,3,10,2,10,7,3,3,Malignant
10,10,10,3,10,8,8,1,1,Malignant
3,3,2,1,2,3,3,1,1,Benign
1,1,1,1,2,5,1,1,1,Benign
8,3,3,1,2,2,3,2,1,Benign
4,5,5,10,4,10,7,5,8,Malignant
1,1,1,1,4,3,1,1,1,Benign
3,2,1,1,2,2,3,1,1,Benign
1,1,2,2,2,1,3,1,1,Benign
4,2,1,1,2,2,3,1,1,Benign
10,10,10,2,10,10,5,3,3,Malignant
5,3,5,1,8,10,5,3,1,Malignant
5,4,6,7,9,7,8,10,1,Malignant
1,1,1,1,2,1,2,1,1,Benign
7,5,3,7,4,10,7,5,5,Malignant
3,1,1,1,2,1,3,1,1,Benign
8,3,5,4,5,10,1,6,2,Malignant
1,1,1,1,10,1,1,1,1,Benign
5,1,3,1,2,1,2,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
5,10,8,10,8,10,3,6,3,Malignant
3,1,1,1,2,1,2,2,1,Benign
3,1,1,1,3,1,2,1,1,Benign
5,1,1,1,2,2,3,3,1,Benign
4,1,1,1,2,1,2,1,1,Benign
3,1,1,1,2,1,1,1,1,Benign
4,1,2,1,2,1,2,1,1,Benign
1,1,1,1,1,4,2,1,1,Benign
3,1,1,1,2,1,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
9,5,5,4,4,5,4,3,3,Malignant
1,1,1,1,2,5,1,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
1,1,3,1,2,4,2,1,1,Benign
3,4,5,2,6,8,4,1,1,Malignant
1,1,1,1,3,2,2,1,1,Benign
3,1,1,3,8,1,5,8,1,Benign
8,8,7,4,10,10,7,8,7,Malignant
1,1,1,1,1,1,3,1,1,Benign
7,2,4,1,6,10,5,4,3,Malignant
10,10,8,6,4,5,8,10,1,Malignant
4,1,1,1,2,3,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
5,5,5,6,3,10,3,1,1,Malignant
1,2,2,1,2,1,2,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
1,1,2,1,3,4,1,1,1,Benign
9,9,10,3,6,10,7,10,6,Malignant
10,7,7,4,5,10,5,7,2,Malignant
4,1,1,1,2,1,3,2,1,Benign
3,1,1,1,2,1,3,1,1,Benign
1,1,1,2,1,3,1,1,7,Benign
5,1,1,1,2,4,3,1,1,Benign
4,1,1,1,2,2,3,2,1,Benign
5,6,7,8,8,10,3,10,3,Malignant
10,8,10,10,6,1,3,1,10,Malignant
3,1,1,1,2,1,3,1,1,Benign
1,1,1,2,1,1,1,1,1,Benign
3,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
6,10,10,10,8,10,10,10,7,Malignant
8,6,5,4,3,10,6,1,1,Malignant
5,8,7,7,10,10,5,7,1,Malignant
2,1,1,1,2,1,3,1,1,Benign
5,10,10,3,8,1,5,10,3,Malignant
4,1,1,1,2,1,3,1,1,Benign
5,3,3,3,6,10,3,1,1,Malignant
1,1,1,1,1,1,3,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
6,1,1,1,2,1,3,1,1,Benign
5,8,8,8,5,10,7,8,1,Malignant
8,7,6,4,4,10,5,1,1,Malignant
2,1,1,1,1,1,3,1,1,Benign
1,5,8,6,5,8,7,10,1,Malignant
10,5,6,10,6,10,7,7,10,Malignant
5,8,4,10,5,8,9,10,1,Malignant
1,2,3,1,2,1,3,1,1,Benign
10,10,10,8,6,8,7,10,1,Malignant
7,5,10,10,10,10,4,10,3,Malignant
5,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
3,1,1,1,2,1,3,1,1,Benign
4,1,1,1,2,1,3,1,1,Benign
8,4,4,5,4,7,7,8,2,Benign
5,1,1,4,2,1,3,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
9,7,7,5,5,10,7,8,3,Malignant
10,8,8,4,10,10,8,1,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
5,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
5,10,10,9,6,10,7,10,5,Malignant
10,10,9,3,7,5,3,5,1,Malignant
1,1,1,1,1,1,3,1,1,Benign
1,1,1,1,1,1,3,1,1,Benign
5,1,1,1,1,1,3,1,1,Benign
8,10,10,10,5,10,8,10,6,Malignant
8,10,8,8,4,8,7,7,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
10,10,10,10,7,10,7,10,4,Malignant
10,10,10,10,3,10,10,6,1,Malignant
8,7,8,7,5,5,5,10,2,Malignant
1,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
6,10,7,7,6,4,8,10,2,Malignant
6,1,3,1,2,1,3,1,1,Benign
1,1,1,2,2,1,3,1,1,Benign
10,6,4,3,10,10,9,10,1,Malignant
4,1,1,3,1,5,2,1,1,Malignant
7,5,6,3,3,8,7,4,1,Malignant
10,5,5,6,3,10,7,9,2,Malignant
1,1,1,1,2,1,2,1,1,Benign
10,5,7,4,4,10,8,9,1,Malignant
8,9,9,5,3,5,7,7,1,Malignant
1,1,1,1,1,1,3,1,1,Benign
10,10,10,3,10,10,9,10,1,Malignant
7,4,7,4,3,7,7,6,1,Malignant
6,8,7,5,6,8,8,9,2,Malignant
8,4,6,3,3,1,4,3,1,Benign
10,4,5,5,5,10,4,1,1,Malignant
3,3,2,1,3,1,3,6,1,Benign
3,1,4,1,2,4,3,1,1,Benign
10,8,8,2,8,10,4,8,10,Malignant
9,8,8,5,6,2,4,10,4,Malignant
8,10,10,8,6,9,3,10,10,Malignant
10,4,3,2,3,10,5,3,2,Malignant
5,1,3,3,2,2,2,3,1,Benign
3,1,1,3,1,1,3,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,5,5,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
5,1,1,2,2,2,3,1,1,Benign
8,10,10,8,5,10,7,8,1,Malignant
8,4,4,1,2,9,3,3,1,Malignant
4,1,1,1,2,1,3,6,1,Benign
3,1,1,1,2,4,3,1,1,Benign
1,2,2,1,2,1,1,1,1,Benign
10,4,4,10,2,10,5,3,3,Malignant
6,3,3,5,3,10,3,5,3,Benign
6,10,10,2,8,10,7,3,3,Malignant
9,10,10,1,10,8,3,3,1,Malignant
5,6,6,2,4,10,3,6,1,Malignant
3,1,1,1,2,1,1,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
3,1,1,1,2,1,3,1,1,Benign
5,7,7,1,5,8,3,4,1,Benign
10,5,8,10,3,10,5,1,3,Malignant
5,10,10,6,10,10,10,6,5,Malignant
8,8,9,4,5,10,7,8,1,Malignant
10,4,4,10,6,10,5,5,1,Malignant
7,9,4,10,10,3,5,3,3,Malignant
5,1,4,1,2,1,3,2,1,Benign
10,10,6,3,3,10,4,3,2,Malignant
3,3,5,2,3,10,7,1,1,Malignant
10,8,8,2,3,4,8,7,8,Malignant
1,1,1,1,2,1,3,1,1,Benign
8,4,7,1,3,10,3,9,2,Malignant
5,1,1,1,2,1,3,1,1,Benign
3,3,5,2,3,10,7,1,1,Malignant
7,2,4,1,3,4,3,3,1,Malignant
3,1,1,1,2,1,3,2,1,Benign
3,1,3,1,2,4,2,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
10,5,7,3,3,7,3,3,8,Malignant
3,1,1,1,2,1,3,1,1,Benign
2,1,1,2,2,1,3,1,1,Benign
1,4,3,10,4,10,5,6,1,Malignant
10,4,6,1,2,10,5,3,1,Malignant
7,4,5,10,2,10,3,8,2,Malignant
8,10,10,10,8,10,10,7,3,Malignant
10,10,10,10,10,10,4,10,10,Malignant
3,1,1,1,3,1,2,1,1,Benign
6,1,3,1,4,5,5,10,1,Malignant
5,6,6,8,6,10,4,10,4,Malignant
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
8,8,8,1,2,4,6,10,1,Malignant
10,4,4,6,2,10,2,3,1,Malignant
1,1,1,1,2,4,2,1,1,Benign
5,5,7,8,6,10,7,4,1,Malignant
5,3,4,3,4,5,4,7,1,Benign
5,4,3,1,2,4,2,3,1,Benign
8,2,1,1,5,1,1,1,1,Benign
9,1,2,6,4,10,7,7,2,Malignant
8,4,10,5,4,4,7,10,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
10,10,10,7,9,10,7,10,10,Malignant
1,1,1,1,2,1,3,1,1,Benign
8,3,4,9,3,10,3,3,1,Malignant
10,8,4,4,4,10,3,10,4,Malignant
1,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
7,8,7,6,4,3,8,8,4,Malignant
3,1,1,1,2,5,5,1,1,Benign
2,1,1,1,3,1,2,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
8,6,4,10,10,1,3,5,1,Malignant
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,1,1,2,1,1,Benign
4,6,5,6,7,4,4,9,1,Benign
5,5,5,2,5,10,4,3,1,Malignant
6,8,7,8,6,8,8,9,1,Malignant
1,1,1,1,5,1,3,1,1,Benign
4,4,4,4,6,5,7,3,1,Benign
7,6,3,2,5,10,7,4,6,Malignant
3,1,1,1,2,4,3,1,1,Benign
3,1,1,1,2,1,3,1,1,Benign
5,4,6,10,2,10,4,1,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
3,2,2,1,2,1,2,3,1,Benign
10,1,1,1,2,10,5,4,1,Malignant
1,1,1,1,2,1,2,1,1,Benign
8,10,3,2,6,4,3,10,1,Malignant
10,4,6,4,5,10,7,1,1,Malignant
10,4,7,2,2,8,6,1,1,Malignant
5,1,1,1,2,1,3,1,2,Benign
5,2,2,2,2,1,2,2,1,Benign
5,4,6,6,4,10,4,3,1,Malignant
8,6,7,3,3,10,3,4,2,Malignant
1,1,1,1,2,1,1,1,1,Benign
6,5,5,8,4,10,3,4,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
1,1,1,1,1,1,2,1,1,Benign
8,5,5,5,2,10,4,3,1,Malignant
10,3,3,1,2,10,7,6,1,Malignant
1,1,1,1,2,1,3,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
7,6,4,8,10,10,9,5,3,Malignant
1,1,1,1,2,1,1,1,1,Benign
5,2,2,2,3,1,1,3,1,Benign
1,1,1,1,1,1,1,3,1,Benign
3,4,4,10,5,1,3,3,1,Malignant
4,2,3,5,3,8,7,6,1,Malignant
5,1,1,3,2,1,1,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
3,4,5,3,7,3,4,6,1,Benign
2,7,10,10,7,10,4,9,4,Malignant
1,1,1,1,2,1,2,1,1,Benign
4,1,1,1,3,1,2,2,1,Benign
5,3,3,1,3,3,3,3,3,Malignant
8,10,10,7,10,10,7,3,8,Malignant
8,10,5,3,8,4,4,10,3,Malignant
10,3,5,4,3,7,3,5,3,Malignant
6,10,10,10,10,10,8,10,10,Malignant
3,10,3,10,6,10,5,1,4,Malignant
3,2,2,1,4,3,2,1,1,Benign
4,4,4,2,2,3,2,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
6,10,10,10,8,10,7,10,7,Malignant
5,8,8,10,5,10,8,10,3,Malignant
1,1,3,1,2,1,1,1,1,Benign
1,1,3,1,1,1,2,1,1,Benign
4,3,2,1,3,1,2,1,1,Benign
1,1,3,1,2,1,1,1,1,Benign
4,1,2,1,2,1,2,1,1,Benign
5,1,1,2,2,1,2,1,1,Benign
3,1,2,1,2,1,2,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
1,1,1,1,1,1,2,1,1,Benign
3,1,1,4,3,1,2,2,1,Benign
5,3,4,1,4,1,3,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
10,6,3,6,4,10,7,8,4,Malignant
3,2,2,2,2,1,3,2,1,Benign
2,1,1,1,2,1,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
3,3,2,2,3,1,1,2,3,Benign
7,6,6,3,2,10,7,1,1,Malignant
5,3,3,2,3,1,3,1,1,Benign
2,1,1,1,2,1,2,2,1,Benign
5,1,1,1,3,2,2,2,1,Benign
1,1,1,2,2,1,2,1,1,Benign
10,8,7,4,3,10,7,9,1,Malignant
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,1,1,1,1,1,Benign
1,2,3,1,2,1,2,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
3,1,1,1,2,1,3,1,1,Benign
4,1,1,1,2,1,1,1,1,Benign
3,2,1,1,2,1,2,2,1,Benign
1,2,3,1,2,1,1,1,1,Benign
3,10,8,7,6,9,9,3,8,Malignant
3,1,1,1,2,1,1,1,1,Benign
5,3,3,1,2,1,2,1,1,Benign
3,1,1,1,2,4,1,1,1,Benign
1,2,1,3,2,1,1,2,1,Benign
1,1,1,1,2,1,2,1,1,Benign
4,2,2,1,2,1,2,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
2,3,2,2,2,2,3,1,1,Benign
3,1,2,1,2,1,2,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
1,1,1,1,1,4,2,1,1,Benign
10,10,10,6,8,4,8,5,1,Malignant
5,1,2,1,2,1,3,1,1,Benign
8,5,6,2,3,10,6,6,1,Malignant
3,3,2,6,3,3,3,5,1,Benign
8,7,8,5,10,10,7,2,1,Malignant
1,1,1,1,2,1,2,1,1,Benign
5,2,2,2,2,2,3,2,2,Benign
2,3,1,1,5,1,1,1,1,Benign
3,2,2,3,2,3,3,1,1,Benign
10,10,10,7,10,10,8,2,1,Malignant
4,3,3,1,2,1,3,3,1,Benign
5,1,3,1,2,1,2,1,1,Benign
3,1,1,1,2,1,1,1,1,Benign
9,10,10,10,10,10,10,10,1,Malignant
5,3,6,1,2,1,1,1,1,Benign
8,7,8,2,4,2,5,10,1,Malignant
1,1,1,1,2,1,2,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
1,3,1,1,2,1,2,2,1,Benign
5,1,1,3,4,1,3,2,1,Benign
5,1,1,1,2,1,2,2,1,Benign
3,2,2,3,2,1,1,1,1,Benign
6,9,7,5,5,8,4,2,1,Benign
10,8,10,1,3,10,5,1,1,Malignant
10,10,10,1,6,1,2,8,1,Malignant
4,1,1,1,2,1,1,1,1,Benign
4,1,3,3,2,1,1,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
10,4,3,10,4,10,10,1,1,Malignant
5,2,2,4,2,4,1,1,1,Benign
1,1,1,3,2,3,1,1,1,Benign
1,1,1,1,2,2,1,1,1,Benign
5,1,1,6,3,1,2,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
1,1,1,1,1,1,1,1,1,Benign
5,7,9,8,6,10,8,10,1,Malignant
4,1,1,3,1,1,2,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
3,1,1,3,2,1,1,1,1,Benign
4,5,5,8,6,10,10,7,1,Malignant
2,3,1,1,3,1,1,1,1,Benign
10,2,2,1,2,6,1,1,2,Malignant
10,6,5,8,5,10,8,6,1,Malignant
8,8,9,6,6,3,10,10,1,Malignant
5,1,2,1,2,1,1,1,1,Benign
5,1,3,1,2,1,1,1,1,Benign
5,1,1,3,2,1,1,1,1,Benign
3,1,1,1,2,5,1,1,1,Benign
6,1,1,3,2,1,1,1,1,Benign
4,1,1,1,2,1,1,2,1,Benign
4,1,1,1,2,1,1,1,1,Benign
10,9,8,7,6,4,7,10,3,Malignant
10,6,6,2,4,10,9,7,1,Malignant
6,6,6,5,4,10,7,6,2,Malignant
4,1,1,1,2,1,1,1,1,Benign
1,1,2,1,2,1,2,1,1,Benign
3,1,1,1,1,1,2,1,1,Benign
6,1,1,3,2,1,1,1,1,Benign
6,1,1,1,1,1,1,1,1,Benign
4,1,1,1,2,1,1,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
3,1,1,1,2,1,1,1,1,Benign
4,1,2,1,2,1,1,1,1,Benign
4,1,1,1,2,1,1,1,1,Benign
5,2,1,1,2,1,1,1,1,Benign
4,8,7,10,4,10,7,5,1,Malignant
5,1,1,1,1,1,1,1,1,Benign
5,3,2,4,2,1,1,1,1,Benign
9,10,10,10,10,5,10,10,10,Malignant
8,7,8,5,5,10,9,10,1,Malignant
5,1,2,1,2,1,1,1,1,Benign
1,1,1,3,1,3,1,1,1,Benign
3,1,1,1,1,1,2,1,1,Benign
10,10,10,10,6,10,8,1,5,Malignant
3,6,4,10,3,3,3,4,1,Malignant
6,3,2,1,3,4,4,1,1,Malignant
1,1,1,1,2,1,1,1,1,Benign
5,8,9,4,3,10,7,1,1,Malignant
4,1,1,1,1,1,2,1,1,Benign
5,10,10,10,6,10,6,5,2,Malignant
5,1,2,10,4,5,2,1,1,Benign
3,1,1,1,1,1,2,1,1,Benign
1,1,1,1,1,1,1,1,1,Benign
4,2,1,1,2,1,1,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
6,1,1,1,2,1,3,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
4,1,1,2,2,1,2,1,1,Benign
4,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
3,3,1,1,2,1,1,1,1,Benign
8,10,10,10,7,5,4,8,7,Malignant
1,1,1,1,2,4,1,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
3,1,1,1,1,1,2,1,1,Benign
6,6,7,10,3,10,8,10,2,Malignant
4,10,4,7,3,10,9,10,1,Malignant
1,1,1,1,1,1,1,1,1,Benign
1,1,1,1,1,1,2,1,1,Benign
3,1,2,2,2,1,1,1,1,Benign
4,7,8,3,4,10,9,1,1,Malignant
1,1,1,1,3,1,1,1,1,Benign
4,1,1,1,3,1,1,1,1,Benign
10,4,5,4,3,5,7,3,1,Malignant
7,5,6,10,4,10,5,3,1,Malignant
3,1,1,1,2,1,2,1,1,Benign
3,1,1,2,2,1,1,1,1,Benign
4,1,1,1,2,1,1,1,1,Benign
4,1,1,1,2,1,3,1,1,Benign
6,1,3,2,2,1,1,1,1,Benign
4,1,1,1,1,1,2,1,1,Benign
7,4,4,3,4,10,6,9,1,Malignant
4,2,2,1,2,1,2,1,1,Benign
1,1,1,1,1,1,3,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
1,1,3,2,2,1,3,1,1,Benign
5,1,1,1,2,1,3,1,1,Benign
5,1,2,1,2,1,3,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
6,1,1,1,2,1,2,1,1,Benign
5,1,1,1,2,2,2,1,1,Benign
3,1,1,1,2,1,1,1,1,Benign
5,3,1,1,2,1,1,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
2,1,3,2,2,1,2,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
6,10,10,10,4,10,7,10,1,Malignant
2,1,1,1,1,1,1,1,1,Benign
3,1,1,1,1,1,1,1,1,Benign
7,8,3,7,4,5,7,8,2,Malignant
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
3,2,2,2,2,1,4,2,1,Benign
4,4,2,1,2,5,2,1,2,Benign
3,1,1,1,2,1,1,1,1,Benign
4,3,1,1,2,1,4,8,1,Benign
5,2,2,2,1,1,2,1,1,Benign
5,1,1,3,2,1,1,1,1,Benign
2,1,1,1,2,1,2,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
5,1,1,1,2,1,3,1,1,Benign
5,1,1,1,2,1,3,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
4,1,1,1,2,1,3,2,1,Benign
5,7,10,10,5,10,10,10,1,Malignant
3,1,2,1,2,1,3,1,1,Benign
4,1,1,1,2,3,2,1,1,Benign
8,4,4,1,6,10,2,5,2,Malignant
10,10,8,10,6,5,10,3,1,Malignant
8,10,4,4,8,10,8,2,1,Malignant
7,6,10,5,3,10,9,10,2,Malignant
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
10,9,7,3,4,2,7,7,1,Malignant
5,1,2,1,2,1,3,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,3,1,1,Benign
5,1,2,1,2,1,2,1,1,Benign
5,7,10,6,5,10,7,5,1,Malignant
6,10,5,5,4,10,6,10,1,Malignant
3,1,1,1,2,1,1,1,1,Benign
5,1,1,6,3,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
8,10,10,10,6,10,10,10,1,Malignant
5,1,1,1,2,1,2,2,1,Benign
9,8,8,9,6,3,4,1,1,Malignant
5,1,1,1,2,1,1,1,1,Benign
4,10,8,5,4,1,10,1,1,Malignant
2,5,7,6,4,10,7,6,1,Malignant
10,3,4,5,3,10,4,1,1,Malignant
5,1,2,1,2,1,1,1,1,Benign
4,8,6,3,4,10,7,1,1,Malignant
5,1,1,1,2,1,2,1,1,Benign
4,1,2,1,2,1,2,1,1,Benign
5,1,3,1,2,1,3,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
5,2,4,1,1,1,1,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,1,1,2,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
5,4,6,8,4,1,8,10,1,Malignant
5,3,2,8,5,10,8,1,2,Malignant
10,5,10,3,5,8,7,8,3,Malignant
4,1,1,2,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
5,10,10,10,10,10,10,1,1,Malignant
5,1,1,1,2,1,1,1,1,Benign
10,4,3,10,3,10,7,1,2,Malignant
5,10,10,10,5,2,8,5,1,Malignant
8,10,10,10,6,10,10,10,10,Malignant
2,3,1,1,2,1,2,1,1,Benign
2,1,1,1,1,1,2,1,1,Benign
4,1,3,1,2,1,2,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,1,4,1,1,1,Benign
4,1,1,1,2,1,2,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
6,3,3,3,3,2,6,1,1,Benign
7,1,2,3,2,1,2,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
5,1,1,2,1,1,2,1,1,Benign
3,1,3,1,3,4,1,1,1,Benign
4,6,6,5,7,6,7,7,3,Malignant
2,1,1,1,2,5,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
4,1,1,1,2,1,1,1,1,Benign
6,2,3,1,2,1,1,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
8,7,4,4,5,3,5,10,1,Malignant
3,1,1,1,2,1,1,1,1,Benign
3,1,4,1,2,1,1,1,1,Benign
10,10,7,8,7,1,10,10,3,Malignant
4,2,4,3,2,2,2,1,1,Benign
4,1,1,1,2,1,1,1,1,Benign
5,1,1,3,2,1,1,1,1,Benign
4,1,1,3,2,1,1,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
1,2,2,1,2,1,1,1,1,Benign
1,1,1,3,2,1,1,1,1,Benign
5,10,10,10,10,2,10,10,10,Malignant
3,1,1,1,2,1,2,1,1,Benign
3,1,1,2,3,4,1,1,1,Benign
1,2,1,3,2,1,2,1,1,Benign
5,1,1,1,2,1,2,2,1,Benign
4,1,1,1,2,1,2,1,1,Benign
3,1,1,1,2,1,3,1,1,Benign
3,1,1,1,2,1,2,1,1,Benign
5,1,1,1,2,1,2,1,1,Benign
5,4,5,1,8,1,3,6,1,Benign
7,8,8,7,3,10,7,2,3,Malignant
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
4,1,1,1,2,1,3,1,1,Benign
1,1,3,1,2,1,2,1,1,Benign
1,1,3,1,2,1,2,1,1,Benign
3,1,1,3,2,1,2,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
5,2,2,2,2,1,1,1,2,Benign
3,1,1,1,2,1,3,1,1,Benign
5,7,4,1,6,1,7,10,3,Malignant
5,10,10,8,5,5,7,10,1,Malignant
3,10,7,8,5,8,7,4,1,Malignant
3,2,1,2,2,1,3,1,1,Benign
2,1,1,1,2,1,3,1,1,Benign
5,3,2,1,3,1,1,1,1,Benign
1,1,1,1,2,1,2,1,1,Benign
4,1,4,1,2,1,1,1,1,Benign
1,1,2,1,2,1,2,1,1,Benign
5,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
10,10,10,10,5,10,10,10,7,Malignant
5,10,10,10,4,10,5,6,3,Malignant
5,1,1,1,2,1,3,2,1,Benign
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,1,Benign
3,1,1,1,2,1,2,3,1,Benign
4,1,1,1,2,1,1,1,1,Benign
1,1,1,1,2,1,1,1,8,Benign
1,1,1,3,2,1,1,1,1,Benign
5,10,10,5,4,5,4,4,1,Malignant
3,1,1,1,2,1,1,1,1,Benign
3,1,1,1,2,1,2,1,2,Benign
3,1,1,1,3,2,1,1,1,Benign
2,1,1,1,2,1,1,1,1,Benign
5,10,10,3,7,3,8,10,2,Malignant
4,8,6,4,3,4,10,6,1,Malignant
4,8,8,5,4,5,10,4,1,Malignant
unable to load file from head commit

@ -1 +0,0 @@
{"duration": 0.5628790855407715, "input_args": {"ClassifierIDsList": "''", "keyRetrieved": "0"}}

@ -1,54 +0,0 @@
# first line: 249
def EnsembleModel (ClassifierIDsList, keyRetrieved):
if (keyRetrieved == 0):
all_classifiers = []
all_classifiers.append(KNeighborsClassifier(n_neighbors=1))
all_classifiers.append(KNeighborsClassifier(n_neighbors=2))
all_classifiers.append(KNeighborsClassifier(n_neighbors=10))
all_classifiers.append(RandomForestClassifier(random_state=RANDOM_SEED, n_estimators = 1))
all_classifiers.append(RandomForestClassifier(random_state=RANDOM_SEED, n_estimators = 50))
lr = LogisticRegression()
sclf = StackingCVClassifier(classifiers=all_classifiers,
use_probas=True,
meta_classifier=lr,
random_state=RANDOM_SEED,
n_jobs = -1)
for clf, label in zip([sclf],
['StackingClassifierAllClassifiers']):
scores = model_selection.cross_val_score(clf, XData, yData,
cv=5, scoring='accuracy')
print("Accuracy: %0.2f (+/- %0.2f) [%s]"
% (scores.mean(), scores.std(), label))
else:
all_classifiers = []
ClassifierIDsList = ClassifierIDsList.split('"')
for loop in ClassifierIDsList:
if ('ClassifierID' in loop):
if (loop == 'ClassifierID: 1'):
all_classifiers.append(KNeighborsClassifier(n_neighbors=1))
elif (loop == 'ClassifierID: 2'):
all_classifiers.append(KNeighborsClassifier(n_neighbors=2))
elif (loop == 'ClassifierID: 3'):
all_classifiers.append(KNeighborsClassifier(n_neighbors=10))
elif (loop == 'ClassifierID: 4'):
all_classifiers.append(RandomForestClassifier(random_state=RANDOM_SEED, n_estimators = 1))
else:
all_classifiers.append(RandomForestClassifier(random_state=RANDOM_SEED, n_estimators = 50))
lr = LogisticRegression()
sclf = StackingCVClassifier(classifiers=all_classifiers,
use_probas=True,
meta_classifier=lr,
random_state=RANDOM_SEED,
n_jobs = -1)
for clf, label in zip([sclf],
['StackingClassifierSelectedClassifiers']):
scores = model_selection.cross_val_score(clf, XData, yData,
cv=5, scoring='accuracy')
print("Accuracy: %0.2f (+/- %0.2f) [%s]"
% (scores.mean(), scores.std(), label))

@ -1 +0,0 @@
{"duration": 0.26462531089782715, "input_args": {"clf": "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n metric_params=None, n_jobs=None, n_neighbors=5, p=2,\n weights='uniform')", "params": "{'n_neighbors': [1, 2, 10]}", "scoring": "{'accuracy': 'accuracy', 'f1_macro': 'f1_weighted', 'precision': 'precision_weighted', 'recall': 'recall_weighted', 'jaccard': 'jaccard_weighted'}", "FI": "0"}}

@ -1 +0,0 @@
{"duration": 0.792708158493042, "input_args": {"clf": "RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',\n max_depth=None, max_features='auto', max_leaf_nodes=None,\n min_impurity_decrease=0.0, min_impurity_split=None,\n min_samples_leaf=1, min_samples_split=2,\n min_weight_fraction_leaf=0.0, n_estimators='warn',\n n_jobs=None, oob_score=False, random_state=None,\n verbose=0, warm_start=False)", "params": "{'n_estimators': [10, 50]}", "scoring": "{'accuracy': 'accuracy', 'f1_macro': 'f1_weighted', 'precision': 'precision_weighted', 'recall': 'recall_weighted', 'jaccard': 'jaccard_weighted'}", "FI": "1"}}

@ -1,51 +0,0 @@
# first line: 85
def GridSearch(clf, params, scoring, FI):
grid = GridSearchCV(estimator=clf,
param_grid=params,
scoring=scoring,
cv=5,
refit='accuracy',
n_jobs = -1)
grid.fit(XData, yData)
cv_results = []
cv_results.append(grid.cv_results_)
df_cv_results = pd.DataFrame.from_dict(cv_results)
number_of_classifiers = len(df_cv_results.iloc[0][0])
number_of_columns = len(df_cv_results.iloc[0])
df_cv_results_per_item = []
df_cv_results_per_row = []
for i in range(number_of_classifiers):
df_cv_results_per_item = []
for column in df_cv_results.iloc[0]:
df_cv_results_per_item.append(column[i])
df_cv_results_per_row.append(df_cv_results_per_item)
df_cv_results_classifiers = pd.DataFrame(data = df_cv_results_per_row, columns= df_cv_results.columns)
parameters = df_cv_results_classifiers['params']
FeatureImp = []
target_names = ['class 0', 'class 1', 'class 2']
for eachClassifierParams in grid.cv_results_['params']:
eachClassifierParamsDictList = {}
for key, value in eachClassifierParams.items():
Listvalue = []
Listvalue.append(value)
eachClassifierParamsDictList[key] = Listvalue
grid = GridSearchCV(estimator=clf,
param_grid=eachClassifierParamsDictList,
scoring=scoring,
cv=5,
refit='accuracy',
n_jobs = -1)
print(eachClassifierParamsDictList)
grid.fit(XData, yData)
yPredict = grid.predict(XData)
print(classification_report(yData, yPredict, target_names=target_names))
if (FI == 1):
FeatureImp.append(grid.best_estimator_.feature_importances_)
return df_cv_results_classifiers, parameters, FeatureImp

@ -1 +0,0 @@
{"duration": 13.885742902755737, "input_args": {"clf": "RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',\n max_depth=None, max_features='auto', max_leaf_nodes=None,\n min_impurity_decrease=0.0, min_impurity_split=None,\n min_samples_leaf=1, min_samples_split=2,\n min_weight_fraction_leaf=0.0, n_estimators='warn',\n n_jobs=None, oob_score=False, random_state=None,\n verbose=0, warm_start=False)", "params": "{'n_estimators': [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119], 'criterion': ['gini', 'entropy']}", "eachAlgor": "'RF'", "factors": "[1, 1, 1, 1, 1, 1]"}}

@ -1 +0,0 @@
{"duration": 36.23512291908264, "input_args": {"clf": "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n metric_params=None, n_jobs=None, n_neighbors=5, p=2,\n weights='uniform')", "params": "{'n_neighbors': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], 'weights': ['uniform', 'distance'], 'algorithm': ['brute', 'kd_tree', 'ball_tree'], 'metric': ['chebyshev', 'manhattan', 'euclidean', 'minkowski']}", "eachAlgor": "'KNN'", "factors": "[1, 1, 1, 1, 1, 1]"}}

@ -1,96 +0,0 @@
# first line: 714
def GridSearchForModels(clf, params, eachAlgor, factors):
# scoring parameters
global scoring
# number of scoring parameters
global NumberofscoringMetrics
# crossvalidation number
global crossValidation
# instantiate spark session
spark = (
SparkSession
.builder
.getOrCreate()
)
sc = spark.sparkContext
# this is the grid we use to train the models
grid = DistGridSearchCV(
estimator=clf, param_grid=params,
sc=sc, cv=crossValidation, refit='accuracy', scoring=scoring,
verbose=0, n_jobs=-1)
# fit and extract the probabilities
grid.fit(XData, yData)
yPredict = grid.predict(XData)
# process the results
cv_results = []
cv_results.append(grid.cv_results_)
df_cv_results = pd.DataFrame.from_dict(cv_results)
# number of models stored
number_of_models = len(df_cv_results.iloc[0][0])
# initialize results per row
df_cv_results_per_row = []
# loop through number of models
for i in range(number_of_models):
# initialize results per item
df_cv_results_per_item = []
for column in df_cv_results.iloc[0]:
df_cv_results_per_item.append(column[i])
df_cv_results_per_row.append(df_cv_results_per_item)
# store the results into a pandas dataframe
df_cv_results_classifiers = pd.DataFrame(data = df_cv_results_per_row, columns= df_cv_results.columns)
# copy and filter in order to get only the metrics
metrics = df_cv_results_classifiers.copy()
metrics = metrics.filter(['mean_test_accuracy','mean_test_f1_macro','mean_test_precision','mean_test_recall','mean_test_jaccard'])
# control the factors
sumperModel = []
for row in metrics.iterrows():
rowSum = 0
lengthFactors = NumberofscoringMetrics
for loop,elements in enumerate(row):
lengthFactors = lengthFactors - 1 + factors[loop]
rowSum = elements*factors[loop] + rowSum
if lengthFactors is 0:
sumperModel = 0
else:
sumperModel.append(rowSum/lengthFactors)
# summarize all models metrics
summarizedMetrics = pd.DataFrame(sumperModel)
summarizedMetrics.rename(columns={0:'sum'})
yPredictProb.append(grid.predict_proba(XData))
# retrieve target names (class names)
global target_names
PerClassMetric = []
PerClassMetric.append(classification_report(yData, yPredict, target_names=target_names, digits=2, output_dict=True))
PerClassMetricPandas = pd.DataFrame(PerClassMetric)
print(PerClassMetricPandas)
del PerClassMetricPandas['accuracy']
del PerClassMetricPandas['macro avg']
del PerClassMetricPandas['weighted avg']
PerClassMetricPandas = PerClassMetricPandas.to_json()
# concat parameters and performance
parameters = pd.DataFrame(df_cv_results_classifiers['params'])
parametersPerformancePerModel = pd.concat([summarizedMetrics, parameters], axis=1)
parametersPerformancePerModel = parametersPerformancePerModel.to_json()
# make global the parameters performance to send it back
global allParametersPerformancePerModel
allParametersPerformancePerModel.append(parametersPerformancePerModel)
allParametersPerformancePerModel.append(PerClassMetricPandas)
return 'Everything is okay'

@ -1 +0,0 @@
{"duration": 11.80344295501709, "input_args": {"clf": "RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',\n max_depth=None, max_features='auto', max_leaf_nodes=None,\n min_impurity_decrease=0.0, min_impurity_split=None,\n min_samples_leaf=1, min_samples_split=2,\n min_weight_fraction_leaf=0.0, n_estimators='warn',\n n_jobs=None, oob_score=False, random_state=None,\n verbose=0, warm_start=False)", "params": "{'n_estimators': [80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119], 'criterion': ['gini', 'entropy']}", "eachAlgor": "'RF'", "factors": "[1, 1, 1, 1, 1, 1]"}}

@ -1 +0,0 @@
{"duration": 28.940529108047485, "input_args": {"clf": "KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n metric_params=None, n_jobs=None, n_neighbors=5, p=2,\n weights='uniform')", "params": "{'n_neighbors': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], 'weights': ['uniform', 'distance'], 'algorithm': ['brute', 'kd_tree', 'ball_tree'], 'metric': ['chebyshev', 'manhattan', 'euclidean', 'minkowski']}", "eachAlgor": "'KNN'", "factors": "[1, 1, 1, 1, 1, 1]"}}

@ -1,76 +0,0 @@
# first line: 705
def GridSearchForParameters(clf, params, eachAlgor, factors):
global scoring
global NumberofscoringMetrics
# instantiate spark session
spark = (
SparkSession
.builder
.getOrCreate()
)
sc = spark.sparkContext
scoring = {'accuracy': 'accuracy', 'f1_macro': 'f1_weighted', 'precision': 'precision_weighted', 'recall': 'recall_weighted', 'jaccard': 'jaccard_weighted'}
global crossValidation
NumberofscoringMetrics = len(scoring)
grid = DistGridSearchCV(
estimator=clf, param_grid=params,
sc=sc, cv=crossValidation, refit='accuracy', scoring=scoring,
verbose=0, n_jobs=-1)
grid.fit(XData, yData)
yPredict = grid.predict(XData)
cv_results = []
cv_results.append(grid.cv_results_)
df_cv_results = pd.DataFrame.from_dict(cv_results)
number_of_classifiers = len(df_cv_results.iloc[0][0])
df_cv_results_per_item = []
df_cv_results_per_row = []
for i in range(number_of_classifiers):
df_cv_results_per_item = []
for column in df_cv_results.iloc[0]:
df_cv_results_per_item.append(column[i])
df_cv_results_per_row.append(df_cv_results_per_item)
df_cv_results_classifiers = pd.DataFrame(data = df_cv_results_per_row, columns= df_cv_results.columns)
global allParametersPerformancePerModel
global parametersPerformancePerModel
metrics = df_cv_results_classifiers.copy()
metrics = metrics.filter(['mean_test_accuracy','mean_test_f1_macro','mean_test_precision','mean_test_recall','mean_test_jaccard'])
sumperModel = []
global rowSum
for index, row in metrics.iterrows():
rowSum = 0
lengthFactors = NumberofscoringMetrics
for loop,elements in enumerate(row):
lengthFactors = lengthFactors - 1 + factors[loop]
rowSum = elements*factors[loop] + rowSum
if lengthFactors is 0:
sumperModel = 0
else:
sumperModel.append(rowSum/lengthFactors)
global target_names
global PerClassMetric
global PerClassMetricPandas
PerClassMetric = []
yPredictProb.append(grid.predict_proba(XData))
PerClassMetric.append(classification_report(yData, yPredict, target_names=target_names, digits=2, output_dict=True))
PerClassMetricPandas = pd.DataFrame(PerClassMetric)
del PerClassMetricPandas['accuracy']
del PerClassMetricPandas['macro avg']
del PerClassMetricPandas['weighted avg']
summarizedMetrics = pd.DataFrame(sumperModel)
summarizedMetrics.rename(columns={0:'sum'})
parameters = pd.DataFrame(df_cv_results_classifiers['params'])
parametersPerformancePerModel = pd.concat([summarizedMetrics, parameters], axis=1)
PerClassMetricPandas = PerClassMetricPandas.to_json()
parametersPerformancePerModel = parametersPerformancePerModel.to_json()
allParametersPerformancePerModel.append(parametersPerformancePerModel)
allParametersPerformancePerModel.append(PerClassMetricPandas)
return 'Everything is okay'

@ -1,105 +0,0 @@
# first line: 133
def InitializeEnsemble():
DataResults = copy.deepcopy(DataResultsRaw)
for dictionary in DataResultsRaw:
for key in dictionary.keys():
if (key.find('*') != -1):
target = key
continue
continue
DataResultsRaw.sort(key=lambda x: x[target], reverse=True)
DataResults.sort(key=lambda x: x[target], reverse=True)
for dictionary in DataResults:
del dictionary['_id']
del dictionary['InstanceID']
del dictionary[target]
AllTargets = [o[target] for o in DataResultsRaw]
AllTargetsFloatValues = []
previous = None
Class = 0
for i, value in enumerate(AllTargets):
if (i == 0):
previous = value
if (value == previous):
AllTargetsFloatValues.append(Class)
else:
Class = Class + 1
AllTargetsFloatValues.append(Class)
previous = value
ArrayDataResults = pd.DataFrame.from_dict(DataResults)
global XData, yData, RANDOM_SEED
XData, yData = ArrayDataResults, AllTargetsFloatValues
warnings.simplefilter('ignore')
RANDOM_SEED = 42
ClassifierIDsList = ''
key = 0
# Initializing models
#scoring = {'accuracy': 'accuracy', 'f1_macro': 'f1_weighted', 'precision': 'precision_weighted', 'recall': 'recall_weighted', 'jaccard': 'jaccard_weighted', 'neg_log_loss': 'neg_log_loss', 'r2': 'r2', 'neg_mean_absolute_error': 'neg_mean_absolute_error', 'neg_mean_absolute_error': 'neg_mean_absolute_error'}
scoring = {'accuracy': 'accuracy', 'f1_macro': 'f1_weighted', 'precision': 'precision_weighted', 'recall': 'recall_weighted', 'jaccard': 'jaccard_weighted'}
NumberofscoringMetrics = len(scoring)
results = []
clf = KNeighborsClassifier()
params = {'n_neighbors': [1, 2, 10]}
IF = 0
#params = {'n_neighbors': [1, 3, 5],
# 'weights': ['uniform', 'distance'],
# 'metric': ['euclidean', 'manhattan']}
results.append(GridSearch(clf, params, scoring, IF))
clf = RandomForestClassifier()
params = {'n_estimators': [10, 50]}
IF = 1
results.append(GridSearch(clf, params, scoring, IF))
df_cv_results_classifiers = pd.concat([results[0][0], results[1][0]], ignore_index=True, sort=False)
parameters = pd.concat([results[0][1], results[1][1]], ignore_index=True, sort=False)
classifiersIDPlusParams = []
classifierID = 0
for oneClassifier in parameters:
classifierID = classifierID + 1
classifiersIDPlusParams.append(classifierID)
classifiersIDPlusParams.append(oneClassifier)
del df_cv_results_classifiers['params']
df_cv_results_classifiers_metrics = df_cv_results_classifiers.copy()
df_cv_results_classifiers_metrics = df_cv_results_classifiers_metrics.ix[:, 0:NumberofscoringMetrics+1]
del df_cv_results_classifiers_metrics['mean_fit_time']
del df_cv_results_classifiers_metrics['mean_score_time']
sumPerClassifier = []
for index, row in df_cv_results_classifiers_metrics.iterrows():
rowSum = 0
for elements in row:
rowSum = elements + rowSum
sumPerClassifier.append(rowSum)
XClassifiers = df_cv_results_classifiers_metrics
embedding = MDS(n_components=2, random_state=RANDOM_SEED)
X_transformed = embedding.fit_transform(XClassifiers).T
X_transformed = X_transformed.tolist()
EnsembleModel(ClassifierIDsList, key)
global ResultsforOverview
ResultsforOverview = []
ResultsforOverview.append(json.dumps(sumPerClassifier))
ResultsforOverview.append(json.dumps(X_transformed))
ResultsforOverview.append(json.dumps(classifiersIDPlusParams))
return ResultsforOverview

Binary file not shown.
Loading…
Cancel
Save