Skip to content

Commit

Permalink
[no ci] docstring and warning edits
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Jun 14, 2023
1 parent 64ed862 commit 88d2bb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ktrain/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def validate(
```
Returns confusion matrix and optionally prints
a classification report.
This is currently only supported for binary and multiclass
classification, not multilabel classification.
For multilabel classification problems,confusion matrices are not supported,
but classification reports are.
By default, this uses val_data, as supplied to ktrain.get_learner().
Other validation or test data can be optionally be supplied as argument.
Expand Down
3 changes: 2 additions & 1 deletion ktrain/text/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,8 @@ def get_classifier(self, fpath=None, multilabel=None, metrics=["accuracy"]):

if multilabel and metrics == ["accuracy"]:
warnings.warn(
'For multilabel problems, we recommend you supply the following argument to this method: metrics=["binary_accuracy"]'
'For multilabel problems, we recommend you supply the following argument to this method: metrics=["binary_accuracy"]. '
+ "Otherwise, a low accuracy score will be displayed by TensorFlow (https://github.com/tensorflow/tensorflow/issues/41114)."
)

# setup model
Expand Down

0 comments on commit 88d2bb5

Please sign in to comment.