On the basis of the epidemic-type aftershock sequence (ETAS) model and the thinning procedure, this paper gives the method about how to classify the earthquakes in a given catalogue into different clusters stochastically. The key points of this method are the probabilities of one event being triggered by another previous event and being a background event. Making use of these probabilities, we can reconstruct the functions associated with the characteristics of earthquake clusters to test a number of important hypotheses about the earthquake clustering phenomena. We applied this reconstruction method to the shallow seismic data in Japan and also to a simulated catalogue. The results show the following assertions: (1) The functions for each component in the formulation of the space-time ETAS model are good enough as a first-order approximation for describing earthquake clusters; (2) a background event triggers less offspring in expectation than a triggered event of the same magnitude; (3) the magnitude distribution of the triggered event depends on the magnitude of its direct ancestor; (4) the diffusion of the aftershock sequence is mainly caused by cascades of individual triggering processes, while no evidence shows that each individual triggering process is diffusive; and (5) the scale of the triggering region is still an exponential law, as formulated in the model but not the same one for the expected number of offspring.