Lagrange Interpolation Method: Algorithm, Computation and Plot | Numerical Computing with Python

  Рет қаралды 55,380

mechtutor com

mechtutor com

4 жыл бұрын

Here's my NumPy mini-course for an 80% discount. Use coupon code: NUMPY80 at rb.gy/pk99l ... I hope you'll find it useful.
Lagrange interpolation (or Lagrangian interpolation) method is one of the most basic and common methods to apply the interpolation polynomials. It was named after the great mathematician Joseph-Louis Lagrange (1736-1813). This tutorial explains the Lagrangian polynomial form of the interpolation function, the algorithm of the method and the Python code by using Python lists with basic for loops and by using the Numpy arrays by using conditional slicing in addition to plotting the interpolation function versus the given data points by using matplotlib.pyplot module.
*** For a full online course, please visit: www.udemy.com/course/programm...
*** New Python course webpage: mechtutor.thinkific.com/cours...

Пікірлер: 41
@mechtutorcom
@mechtutorcom 10 ай бұрын
*GREAT GIVE-AWAY! Full NumPy Course for FREE* . Copy Coupon Code: NQSFREE then go to webpage: rb.gy/pk99l - Limited number. Act fast!
@IndrainKorea
@IndrainKorea 4 жыл бұрын
Thank you for the tutorial! I like the way you explain it too, very clear!
@ignatiolu863
@ignatiolu863 4 жыл бұрын
Just what I was looking for, sir! Great video!
@JD002
@JD002 2 жыл бұрын
The best explanation ,it was so lucid that I don't need to learn from anywhere about this topic any further, thanks a lot. ♥
@asifahmed1801
@asifahmed1801 2 жыл бұрын
cool ! This is one of the best explainaton i have ever seen regarding numerical python subjects
@MathPhysicsFunwithGus
@MathPhysicsFunwithGus 3 жыл бұрын
Amazing video can't wait for more!
@victorcunha8874
@victorcunha8874 4 жыл бұрын
Espetacular, grande abraço do Brasil
@AJ-et3vf
@AJ-et3vf 2 жыл бұрын
Great video sir! Thank you! You explain very well and your voice and video are very soothing and calming. Very nice to listen to.
@sandeepgodiyal5686
@sandeepgodiyal5686 3 жыл бұрын
Thanks for this wonderful course. Can you please help for a small problem for polynomial fitting (4-5 order) of data and to find out regression coefficients?
@user-gs6nx7jh5j
@user-gs6nx7jh5j 3 жыл бұрын
Very useful! Thanks a lot!
@wolnyczowiek8705
@wolnyczowiek8705 Жыл бұрын
Thank you so much that was exactly what i was looking for
@angelortiz3564
@angelortiz3564 2 жыл бұрын
Cool video. Really help me understand this algorithm. I have one questions tho. Given that the code is reseting the yp value every time it calculates, and in truth, the yp values depends on the previously calculated, isn't there a way to use the sum of the previously calculated yplt terms?
@DeGameBox_SRBT
@DeGameBox_SRBT 8 ай бұрын
thanks! thanks! thanks! you just saved my studwork!
@hadimajdi9272
@hadimajdi9272 3 жыл бұрын
spectacular , thank you so much
@manashdey8765
@manashdey8765 3 жыл бұрын
Very nice explanation sir 😊.. thank you ,
@flamazx1
@flamazx1 3 жыл бұрын
Earned a suscriber, thanks!!!!
@mechtutorcom
@mechtutorcom Жыл бұрын
Thank you for watching. To see my new online course, click here: mechtutor.thinkific.com/courses/python-for-science-and-engineering
@CAMiiKatze
@CAMiiKatze 3 жыл бұрын
great. Blew my mind how you can do it in so little lines ! :)
@kudakwashechirinda5652
@kudakwashechirinda5652 2 жыл бұрын
Thanks this is really helpful
@karimlimos8541
@karimlimos8541 4 жыл бұрын
thank you sir for this video
@farhanrafid8584
@farhanrafid8584 3 жыл бұрын
thank you so much.
@anshu_raj_
@anshu_raj_ Жыл бұрын
Thank you so much
@syahputra8777
@syahputra8777 4 жыл бұрын
thanks you sir great video and clear explanation.. btw I really hope you can explane a litle bite description of how to plot lines in linear regression or polinomial regresion. Thanks you
@Matchless_gift
@Matchless_gift 4 жыл бұрын
Great work sir#mathsbeetle
@sugandhasingh3833
@sugandhasingh3833 2 жыл бұрын
how to implement same method for any image?
@purib3992
@purib3992 2 жыл бұрын
can you write code for differentiation to Lagrange's formula
@2hp_logam498
@2hp_logam498 2 жыл бұрын
why is there n + 1 ?
@isaacfernandez2243
@isaacfernandez2243 2 жыл бұрын
how can I calculate the error?
@agustinhernandez4261
@agustinhernandez4261 2 жыл бұрын
Hi, your video is helping me to do a university homework but the teacher want to know what was the polynomial, So i dont have to input the X value. How can i do in order to get the polynomial?
@agustinhernandez4261
@agustinhernandez4261 2 жыл бұрын
cuz then i have to integrate it
@erfanjavaheri398
@erfanjavaheri398 Жыл бұрын
Sir i want for n points how can i do that?
@HuongHoang-ez9si
@HuongHoang-ez9si 4 жыл бұрын
ppval..Is this the method?
@LoganKaleva
@LoganKaleva Жыл бұрын
I know this video is old, but i'm copying the code line for line and it's saying my i isn't defined for yp +=
@nicsim7469
@nicsim7469 3 жыл бұрын
why was xp equal to 50?
@KeremTatlc
@KeremTatlc 3 жыл бұрын
it is a value that you want to predict its y.You are giving the dataset, after than that you are giving an x value and algorithm is calculating it's y value
@amvro23
@amvro23 11 ай бұрын
A similar more comprehensive perpective import numpy as np x = np.linspace(0,100, 6) y = np.array([26.0, 48.6, 61.6, 71.2, 74.8, 75.2]) def lagrange_interpolation(x, y, xp): n = len(x) - 1 # degree of the polynomial index_i = range(n + 1) index_j = range(n + 1) p_values = np.array([np.prod([(xp - x[j]) / (x[i] - x[j]) for j in index_j if j != i]) for i in index_i]) yp = p_values.dot(y[index_i]) return yp lagrange_interpolation(x, y, 50)
@ayushigarewal
@ayushigarewal 11 ай бұрын
why xp=50 pls explain
@mechtutorcom
@mechtutorcom 11 ай бұрын
Thank you for the question. xp represents the value of X which does not exit in the given data set, and we want to know the corresponding Y value of it. In this video, I used xp = 50 as an example only. You can choose any other value between 0 and 100.
@alexandrerocha9148
@alexandrerocha9148 4 жыл бұрын
There somethings wrong in your code, for example, if you take the xp = 90, the answer wasn't anyhing between 74.8 and 75.2
1st Year Calculus, But in PYTHON
32:13
Mr. P Solver
Рет қаралды 120 М.
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 8 МЛН
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 31 МЛН
Lagrange Interpolation
6:54
Dr. Will Wood
Рет қаралды 134 М.
Monte Carlo Integration In Python For Noobs
15:32
Andrew Dotson
Рет қаралды 149 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 137 М.
NumPy Tutorial (2022): For Physicists, Engineers, and Mathematicians
1:32:42
NumPy Crash Course - Complete Tutorial
1:02:44
Patrick Loeber
Рет қаралды 114 М.
Newton Interpolation and Divided Differences
14:03
Dr. Will Wood
Рет қаралды 33 М.
A Simple Solution for Really Hard Problems: Monte Carlo Simulation
5:58
Finding Zeros of Functions In Python (Bisection Method and Scipy)
15:26
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 8 МЛН