This Perspective aims to highlight potential opportunities and challenges for machine learning within a holistic view of health, and builds on research in population and public health that focuses on the mechanisms between different cultural, social and environmental factors and their effect on the health of individuals and communities.