Matrix factorization and Deep Learning in Scientific Domains: Understanding When and Why It Works