Loss Function For Binary Variables