network generation, calculate mutual info