This repository is mainly for study purposes. It contains the Python implementation of the algorithm using PySpark. It is a simple version of implementation of the Newton's Method algorithm. It also includes a very basic version of Stochastic Gradient Descent without regularization for comparison.
Fundamentally, the Newton Raphson Method (as known as Newton's Method) is to find where the function value is zero which is where the curve intercept with the x-axis. Usually, we can just put
The basic equation of Newton Raphson Method is:
This method is an iterative approach where
Basically, there are two ways prove this equation: by using trigonometry or by using Taylor Series.
As we can see above, we have a quadratic function
You may ask how can we obtain the value of
The value of
which is exactly the formula of Newton Raphson Method.
The idea of Taylor Series is to find an estimate of a function. It is an infinite sum of terms that are expressed in the terms of derivatives of a function at a single point. The equation of the Taylor Series is expressed as below:
If we expand the expression above, we have:
In our case, we are looking for the point
However, it is not possible for us to calculate the entire series. Only a portion of the series will give us a rough estimated point
which is the same as the formula of Newton Raphson Method.
