Skip to content

Commit

Permalink
Add descriptive msg for TabNetClassifier multilabel classification
Browse files Browse the repository at this point in the history
Fix linting error

Use IndexError and clarify message

Fix typo
  • Loading branch information
isears authored and Optimox committed Dec 14, 2020
1 parent 0fe5b72 commit 281623c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytorch_tabnet/multiclass_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def _unique_indicator(y):
"""
Not implemented
"""
pass
raise IndexError(
f"""Given labels are of size {y.shape} while they should be (n_samples,) \n"""
+ """If attempting multilabel classification, try using TabNetMultiTaskClassification """
+ """or TabNetRegressor"""
)


_FN_UNIQUE_LABELS = {
Expand Down

0 comments on commit 281623c

Please sign in to comment.