Skip to content

Commit

Permalink
fix: remove defaults values of classifier metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Jun 23, 2023
1 parent 9073f04 commit 4776e46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/safeds/ml/classical/classification/_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def accuracy(self, validation_or_test_set: TaggedTable) -> float:

return sk_accuracy_score(expected_values._data, predicted_values._data)

def precision(self, validation_or_test_set: TaggedTable, positive_class: Any = 1) -> float:
def precision(self, validation_or_test_set: TaggedTable, positive_class: Any) -> float:
"""
Compute the classifier's precision on the given data.
Expand Down Expand Up @@ -154,7 +154,7 @@ def precision(self, validation_or_test_set: TaggedTable, positive_class: Any = 1
return 1.0
return n_true_positives / (n_true_positives + n_false_positives)

def recall(self, validation_or_test_set: TaggedTable, positive_class: Any = 1) -> float:
def recall(self, validation_or_test_set: TaggedTable, positive_class: Any) -> float:
"""
Compute the classifier's recall on the given data.
Expand Down Expand Up @@ -191,7 +191,7 @@ def recall(self, validation_or_test_set: TaggedTable, positive_class: Any = 1) -
return 1.0
return n_true_positives / (n_true_positives + n_false_negatives)

def f1_score(self, validation_or_test_set: TaggedTable, positive_class: Any = 1) -> float:
def f1_score(self, validation_or_test_set: TaggedTable, positive_class: Any) -> float:
"""
Compute the classifier's $F_1$-score on the given data.
Expand Down

0 comments on commit 4776e46

Please sign in to comment.