Minor aesthetic change
This commit is contained in:
parent
639198e774
commit
e73b70ceb7
@ -47,10 +47,10 @@ def lvq1_loss(distances, target_labels, prototype_labels):
|
|||||||
|
|
||||||
def lvq21_loss(distances, target_labels, prototype_labels):
|
def lvq21_loss(distances, target_labels, prototype_labels):
|
||||||
"""LVQ2.1 loss function with support for one-hot labels.
|
"""LVQ2.1 loss function with support for one-hot labels.
|
||||||
|
|
||||||
See Section 4 [Sado&Yamada]
|
See Section 4 [Sado&Yamada]
|
||||||
https://papers.nips.cc/paper/1995/file/9c3b1830513cc3b8fc4b76635d32e692-Paper.pdf
|
https://papers.nips.cc/paper/1995/file/9c3b1830513cc3b8fc4b76635d32e692-Paper.pdf
|
||||||
"""
|
"""
|
||||||
dp, dm = _get_dp_dm(distances, target_labels, prototype_labels)
|
dp, dm = _get_dp_dm(distances, target_labels, prototype_labels)
|
||||||
mu = dp - dm
|
mu = dp - dm
|
||||||
return mu
|
return mu
|
||||||
|
Loading…
Reference in New Issue
Block a user