Skip to content

Commit

Permalink
Merge pull request #289 from kahst/lower-fix
Browse files Browse the repository at this point in the history
lower() when checking for non-event classes for binary classfication
  • Loading branch information
max-mauermann committed Mar 22, 2024
2 parents 7c6fe30 + a1b8210 commit 98bff7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _loadTrainingData(cache_mode="none", cache_file="", progress_callback=None):
if cfg.BINARY_CLASSIFICATION:
if len([l for l in folders if l.startswith("-")]) > 0:
raise Exception("Negative labels cant be used with binary classification")
if len([l for l in folders if l in cfg.NON_EVENT_CLASSES]) == 0:
if len([l for l in folders if l.lower() in cfg.NON_EVENT_CLASSES]) == 0:
raise Exception("Non-event samples are required for binary classification")

# Check if multi label
Expand Down

0 comments on commit 98bff7b

Please sign in to comment.