The complexity of the processes responsible for volcanic eruptions makes a theoretical approach to forecasting the evolution of volcanic unrest rather difficult. A feasible strategy for this purpose appears to be the identification of possible repetitive schemes (patterns) in the pre-eruptive unrest of volcanoes. Nevertheless, the limited availability and the heterogeneity of pre-eruptive data, and the objective difficulty in quantitatively recognizing complex pre-eruptive patterns, make this task very difficult. In this work we address this issue by using a pattern recognition approach applied to the seismicity recorded during 217 volcanic episodes of unrest around the world. In particular, we use two non-parametric algorithms that have proven to give satisfactory results in dealing with a small amount of data, even if not normally distributed and/or characterized by discrete or categorical values. The results show evidence of a longer period of instability in the unrest preceding an eruption, compared to isolated unrest. This might indicate, even if not necessarily, a difference in the energy of processes responsible for the two types of unrest. However, if the unrest is followed by an eruption, it seems that the seismic energy released during the unrest (parameterized by the duration of the swarm and the maximum magnitude recorded) is not indicative of the magnitude of the impending eruption. We also found that, in general, unrest followed by the largest explosive eruptions have a longer repose time than those related to moderate eruptions. This evidence supports the fact that the occurrence of a large eruption needs a sufficient amount of time after the last event in order to re-charge the feeding system and to achieve a closed-conduit regime so that a sufficiently large amount of gas can be accumulated.