How graph algorithms improve machine learning