Skip to main content

Posts

Showing posts with the label newton

Newton–Raphson method - Introduction

This page only deals with the algorithm theory for example of this theory  check out   newtons-raphson-method-for-arriving-at.html   Alright  the theory says for a function  y = x - a , the optimization of parameter ' x ' where y = 0 /close to zero a technique  used for optimization of parameters in machine learning problem,  consider a = 5 , x = 5 , y will be zero but this case is not straight forward  the value for x is obtained using Newton–Raphson method , which is via iteration says  x n+1 = x n - f(x)/f '(x)  f(x) = y = x- a f '(x) = partial derivative of x  = dy/dx = 1 consider 2 iterations here n =0 ,1 it starts with assuming a initial value for x which is n =0 x 0   , y 0 plotting the values in graph  from the graph u can see i have plotted the x0, y0  tangent line to the point cuts the x - axis at x1 where the y is '0' says loss is zero at iteration x1, u may now wonder the the value of X has moved from X0 to X1 minimize the value of X where the loss

Newton's Raphson method - for arriving at minimum using approximation

Alright the  Newton–Raphson method is used here to find the approximate value of some variable. looks weird right ,the idea is to try out some technique to find the  parameter values of a function so that the loss is minimum /close to '0' The method derives the equation as   x n = x n-1 - f(x) /f '(x) f(x) is some function  f '(x) is the derivative of x   here  i have tried some function of my own or u could see the wiki ref for example from below u can the 1st iteration value ,but to minimse the loss we need to go for further iterations.         lets see how the 2nd iteration performs we have arrived at the value of x at x 1 so the loss which is y is zero so what we have achieved with this u can try out some other equation  to get the approx value , still thinking  consider another equation x ^2 = a ,this is to find the root of a ,meaning x = sqrt( a) . so the idea here to to optimize some parameter now it is 'x'  could be other parameter 'm ' or &#