Pattern recognition algorithms for unsupervised graph-based machine learning