Exploiting Class Similarity for Machine Learning with Confidence Labels and Projective Loss Functions