The linear algebra and calculus behind every model