Structural and Functional Discovery in Dynamic Networks with Non-negative Matrix Factorization