diff --git a/csrank/discrete_choice_losses.py b/csrank/discrete_choice_losses.py index 51cb79d7..19ea4f49 100644 --- a/csrank/discrete_choice_losses.py +++ b/csrank/discrete_choice_losses.py @@ -29,8 +29,7 @@ class CategoricalHingeLossMax: arXiv:1901.10860. """ - # Should be: First true, then predicted (as in Cross-Entropy Loss) - # But for some reason skorch calls it with a swapped argument order. + # The argument order is chosen to be compatible with skorch. def __call__(self, scores, true_choice): """Compute the loss of a scoring in the context of a choice. diff --git a/csrank/rank_losses.py b/csrank/rank_losses.py index ffc779ef..0149158d 100644 --- a/csrank/rank_losses.py +++ b/csrank/rank_losses.py @@ -66,8 +66,7 @@ class HingedRankLoss: The total loss, summed over all instances. """ - # Should be: First true, then predicted (as in Cross-Entropy Loss) - # But for some reason skorch calls it with a swapped argument order. + # The argument order is chosen to be compatible with skorch. def __call__(self, comparison_scores, true_rankings): # 2d matrix which is 1 if the row-element *should* be ranked higher than the column element mask = true_rankings[:, :, None] > true_rankings[:, None]