Probabilistic Modeling of Structure in Science: Statistical Physics to Recommender Systems