Learning dynamical processes from structure in complex networks