Added weighted hamming loss