Maths and AI | Calculus-1 | Importance of calculus in Machine Learning

Adarsh Pathak
Mathematics and AI
Published in
3 min readApr 18, 2020

Calculus is one of most important parameter in calculus. In this article I will explain briefly about calculus.Here I am assuming that you have some basic idea of derivatives.

What is derivative and how to calculate derivative of a function f(x)?

The derivative of a function of a real variable measures the sensitivity to change of the output value with respect to a change in its input value.

Derivative of f(x)

Let’s take an example to calculate derivative:

f(x) = 3x+9

We want to know what is the rate of change of f(x) with small change in x. To calculate this we will find its derivative.

derivative of f(x) = f’(x) = 3

So we can conclude from our calculation that in above function, rate of change of f(x) with respect to x will be constant.

What is chain rule?

So in above example our f(x) was 3x+9 and we simply want to find its rate change with respect to x. Now how will we calculate rate of change of new function g(x) = sin(f(x)). We can rewrite g(x) = sin(3x+9) . Can you find the rate of change of g(x) with respect to x. To differentiate this you have to follow some steps:

  1. First differentiate Sin(f(x)) with respect to x which is Cos(f(x)).

2. Now differentiate f(x) with respect to x which is 3.

3. multiply both differentiations which will be your final answer.

differentiation of g(x) = cos(f(x))*f’(x) = 3cos(3x+9)

Advance rules of derivatives (chain rule) which we will use in machine learning.

suppose y = sin(t) ; t = exp(k) ; k = 3x+9

You have to find dy/dx . How will you calculate this?

dy/dx calculation

This is how you can compute any differentiation of a function. This formula is widely used in deep learning. Do better practice of this rule to understand deep learning.

https://quickmath.com/webMathematica3/quickmath/calculus/differentiate/basic.jsp article

Here is one of the article which i personally like the most about differentiation.(optional read: — https://medium.com/analytics-vidhya/unraveling-automatic-differentiation-6d5f0196f219)

If you understand chain rule and basics of differentiation then you are almost ready to learn machine learning algorithms. Before starting machine learning i will briefly explain the python programming language so that you can write your program and test it.

Hope you understand this article. If you like my article please give give a clap and write you opinion about this article.Also suggest me how can i improve this article if you found any errors.

I am writing this articles under the publication AI and Mathematics. So don’t forget to follow that to get latest articles and many more. Share this articles with your friends who love AI or learning AI.

--

--