Text this: Algorithm for link prediction in self-regulating network with adaptive topology based on graph theory and machine learning