Mathematical Foundations of Interactive Machine Learning