hal3 / macarico

learning to search in pytorch
MIT License
111 stars 12 forks source link

Different Variants of Hamming Loss #24

Closed amrsharaf closed 6 years ago

amrsharaf commented 6 years ago

Different variants of hamming loss functions, some of them are additive, others are not:

additive loss functions:

time sensitive + hamming loss: sum(hamming loss * time penalty) distance sensitive hamming loss: loss per step = sum(|prediction - truth|)

non-additive:

hamming loss + L2 norm (sum of hamming loss)^0.5 hamming loss + L-infinity norm: max(hamming loss over all time steps) product: product(hamming loss over all time steps)

This pull request also includes the python notebook analysis script for tracking the difference between the predicted costs in every time step, and the ground truth loss.