Prediction of the binding affinities of peptides to class II MHC using a regularized thermodynamic model