To learn data science and machine learning, you need to prepare some necessary math knowledge.

Calculus

Calculus provides the basic math tools for solving machine learning problems, such as calculating the gradient. Below are the notes on Calculus:

Definition of a derivative:

$f'(x)=\frac{d f(x)}{dx}=\lim_{\Delta x\to0}(\frac{f(x+\Delta x)-f(x)}{\Delta x})$

Rules of derivative:

Total derivative:

For the function $f(x,y,z,...)$, where each variable is a function of parameter $t$, the total derivative is:

$\frac{df}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial z} \frac{dz}{dt} + ...$

Derivatives of named functions:

$\frac{d}{dx}(\frac{1}{x}) = - \frac{1}{x^2}$

$\frac{d}{dx}(sin(x)) = cos(x)$

$\frac{d}{dx}(cos(x)) = - sin(x)$

$\frac{x}{dx}(e^x)=e^x$