Envoyer la notice par courriel: Unifying generative and discriminative learning principles