Combining Reasoning and Learning for Multi-stage Inference in Computational Sustainability and Scientific Discovery