This article proposes a new framework for rapid earthquake loss assessment based on a machine learning damage classification model and a representative sampling algorithm. A random forest classification model predicts a damage probability distribution that, combined with an expert-defined repair cost matrix, enables the calculation of the expected repair costs for each building and, in aggregate, of direct losses in the earthquake-affected area. The proposed building representation does not include explicit information about the earthquake and the soil type. Instead, such information is implicitly contained in the spatial distribution of damage. To capture this distribution, a sampling algorithm, based on K-means clustering, is used to select a minimal number of buildings that represent the area of interest in terms of its seismic risk, independently of future earthquakes. To observe damage states in the representative set after an earthquake, the proposed framework utilizes a local network of trained damage assessors. The model is updated after each damage observation cycle, thus increasing the accuracy of the current loss assessment. The proposed framework is exemplified using the 2010 Kraljevo, Serbia earthquake dataset.