Predicting Ionic Compound Formulas