A machine learning approach to appraise and enhance the structural resilience of buildings to seismic hazards. (November 2022)