Dlux804 / McQuade-Chem-ML

Development of easy to use and reproducible ML scripts for chemistry.
5 stars 1 forks source link

Added multi-label classification for the sider data set. #62

Closed dickeygh closed 4 years ago

dickeygh commented 4 years ago

Classifier.py:

  1. Added () at line 16 so that the classification workflow would run properly.

Features.py:

  1. Fixed spelling at line 48
  2. Changed features variable to self.features for continuity.
  3. Changed lines 91-98 so that self.features will be able to drop multiple targets for multi-target classification.

Models.py:

  1. Added extra data sets to the cds list.
  2. Added a multi_label_classification_dataset list (line 39) to be used for if statement at line 65

Train.py:

  1. Imported multi-label classification evaluation metrics (Lines 5-6)
  2. Changed the train_cls section to work with the new multi-label classification without breaking the workflow for single-label classification.

Main.py:

  1. Changed the classification pipeline to have a list of data sets instead of a dictionary (line 29-30).
  2. Used if statements to determine a target list based on the data set being used (lines 101-115). This works much more intuitively for multi-label classification.
  3. Added if statements that select the right featurization options based on the classification model being used (lines 56-64).
  4. Changed the nesting of loops throughout main.py to fit the new classification workflow. The regression workflow was unimpaired by these changes.
  5. Changed line 81 to have 'dataFiles' instead of 'output' because 'output' was not running on my machine, while 'dataFiles' allowed for the workflow to run.
pep8speaks commented 4 years ago

Hello @dickeygh! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 48:27: E251 unexpected spaces around keyword / parameter equals

Line 39:75: E261 at least two spaces before inline comment Line 39:80: E501 line too long (121 > 79 characters) Line 66:80: E501 line too long (144 > 79 characters) Line 66:83: E251 unexpected spaces around keyword / parameter equals Line 66:85: E251 unexpected spaces around keyword / parameter equals Line 66:92: E261 at least two spaces before inline comment Line 111:1: W391 blank line at end of file

Line 5:80: E501 line too long (137 > 79 characters) Line 86:23: E231 missing whitespace after ',' Line 86:25: E231 missing whitespace after ',' Line 104:57: E261 at least two spaces before inline comment Line 104:80: E501 line too long (184 > 79 characters) Line 106:80: E501 line too long (106 > 79 characters) Line 110:80: E501 line too long (101 > 79 characters) Line 111:80: E501 line too long (80 > 79 characters) Line 148:8: E131 continuation line unaligned for hanging indent Line 165:80: E501 line too long (94 > 79 characters) Line 166:80: E501 line too long (99 > 79 characters) Line 169:80: E501 line too long (95 > 79 characters) Line 170:80: E501 line too long (94 > 79 characters) Line 176:1: W391 blank line at end of file

Line 26:9: E265 block comment should start with '# ' Line 26:80: E501 line too long (82 > 79 characters) Line 29:9: E265 block comment should start with '# ' Line 29:9: E303 too many blank lines (2) Line 29:80: E501 line too long (83 > 79 characters) Line 30:33: E261 at least two spaces before inline comment Line 30:80: E501 line too long (104 > 79 characters) Line 55:80: E501 line too long (91 > 79 characters) Line 57:80: E501 line too long (85 > 79 characters) Line 58:18: E128 continuation line under-indented for visual indent Line 60:80: E501 line too long (85 > 79 characters) Line 63:80: E501 line too long (85 > 79 characters) Line 64:18: E128 continuation line under-indented for visual indent Line 69:54: E261 at least two spaces before inline comment Line 69:80: E501 line too long (84 > 79 characters) Line 70:80: E501 line too long (115 > 79 characters) Line 76:80: E501 line too long (85 > 79 characters) Line 77:80: E501 line too long (113 > 79 characters) Line 78:80: E501 line too long (81 > 79 characters) Line 100:80: E501 line too long (90 > 79 characters) Line 102:80: E501 line too long (237 > 79 characters) Line 103:80: E501 line too long (204 > 79 characters) Line 104:80: E501 line too long (214 > 79 characters) Line 105:80: E501 line too long (208 > 79 characters) Line 106:80: E501 line too long (196 > 79 characters) Line 107:80: E501 line too long (116 > 79 characters) Line 117:80: E501 line too long (91 > 79 characters) Line 123:80: E501 line too long (83 > 79 characters) Line 125:80: E501 line too long (89 > 79 characters) Line 126:80: E501 line too long (82 > 79 characters) Line 138:80: E501 line too long (92 > 79 characters) Line 144:25: E303 too many blank lines (5)

Comment last updated at 2020-07-02 22:21:16 UTC