Rename loss functions

This commit is contained in:
Jensun Ravichandran 2021-06-04 22:15:57 +02:00
parent 827958a28a
commit 7bc0bfa3ab

View File

@ -74,7 +74,8 @@ def _get_class_probabilities(probabilities, targets, prototype_labels):
return whole, correct, wrong return whole, correct, wrong
def log_likelihood_ratio_loss(probabilities, targets, prototype_labels): def nllr_loss(probabilities, targets, prototype_labels):
"""Compute the Negative Log-Likelihood Ratio loss."""
_, correct, wrong = _get_class_probabilities(probabilities, targets, _, correct, wrong = _get_class_probabilities(probabilities, targets,
prototype_labels) prototype_labels)
@ -83,7 +84,8 @@ def log_likelihood_ratio_loss(probabilities, targets, prototype_labels):
return -1.0 * log_likelihood return -1.0 * log_likelihood
def robust_soft_loss(probabilities, targets, prototype_labels): def rslvq_loss(probabilities, targets, prototype_labels):
"""Compute the Robust Soft Learning Vector Quantization (RSLVQ) loss."""
whole, correct, _ = _get_class_probabilities(probabilities, targets, whole, correct, _ = _get_class_probabilities(probabilities, targets,
prototype_labels) prototype_labels)