Constructing balanced datasets for predicting failure modes in structural systems under seismic hazards