Researchers have built an AI system that can predict E. coli contamination in waterways before it becomes dangerous.