Skip to content

Commit

Permalink
Merge pull request #1175 from rachitk/nn
Browse files Browse the repository at this point in the history
Enable multiclass support for TPOT-NN
  • Loading branch information
JDRomano2 authored Feb 25, 2021
2 parents a2d2a64 + 05a1634 commit 68ba5cb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tpot/builtins/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,13 @@ def fit(self, X, y):
def validate_inputs(self, X, y):
# Things we don't want to allow until we've tested them:
# - Sparse inputs
# - Multiclass outputs (e.g., more than 2 classes in `y`)
# - Non-finite inputs
# - Complex inputs

X, y = check_X_y(X, y, accept_sparse=False, allow_nd=False)

assert_all_finite(X, y)

if type_of_target(y) != 'binary':
raise ValueError("Non-binary targets not supported")

if np.any(np.iscomplex(X)) or np.any(np.iscomplex(y)):
raise ValueError("Complex data not supported")
if np.issubdtype(X.dtype, np.object_) or np.issubdtype(y.dtype, np.object_):
Expand Down

0 comments on commit 68ba5cb

Please sign in to comment.