Enable multiclass support for TPOT-NN #1175
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Disables the requirement for binary output classes in TPOT-NN. Resolves #1149.
Where should the reviewer start?
Check
tpot/builtins/nn.py
and make sure the standard TPOT tests still pass.How should this PR be tested?
Test against the standard nosetests suite and see if anything fails. There is currently a test for TPOT-NN specifically to ensure that multiclass problems are NOT supported that will fail as this PR disables that check; this can likely be modified to test that all estimators support multiclass problems.
Multiclass problems where the set of output classes does not exist in a sequence beginning from 0 will still fail - for example, a problem with classes [0, 2, 3, 5, 6] will fail due to not having class 1 and 4, and a problem with classes [1, 2, 3] will fail due to not having class 0. This will likely need to be addressed in a future PR.
The following code should test the multiclass functionality of the NN MLP classifier using TPOT's dependencies:
Any background context you want to provide?
This addresses #1149. Multiclass support was tested and validated using a variety of standard multiclass datasets, with no notable score degradation from base TPOT on multiclass problems.
What are the relevant issues?
#1149
Screenshots (if appropriate)
Questions: