No video

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

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

mechtutor com

mechtutor com

Күн бұрын

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/...
*** New Python course webpage: mechtutor.thin...

Пікірлер: 41
@mechtutorcom
@mechtutorcom Жыл бұрын
*GREAT GIVE-AWAY! Full NumPy Course for FREE* . Copy Coupon Code: NQSFREE then go to webpage: rb.gy/pk99l - Limited number. Act fast!
@asifahmed1801
@asifahmed1801 2 жыл бұрын
cool ! This is one of the best explainaton i have ever seen regarding numerical python subjects
@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. ♥
@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.
@ignatiolu863
@ignatiolu863 4 жыл бұрын
Just what I was looking for, sir! Great video!
@IndrainKorea
@IndrainKorea 4 жыл бұрын
Thank you for the tutorial! I like the way you explain it too, very clear!
@DeGameBox_SRBT
@DeGameBox_SRBT 9 ай бұрын
thanks! thanks! thanks! you just saved my studwork!
@wolnyczowiek8705
@wolnyczowiek8705 Жыл бұрын
Thank you so much that was exactly what i was looking for
@victorcunha8874
@victorcunha8874 4 жыл бұрын
Espetacular, grande abraço do Brasil
@MathPhysicsFunwithGus
@MathPhysicsFunwithGus 3 жыл бұрын
Amazing video can't wait for more!
@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?
@CAMiiKatze
@CAMiiKatze 3 жыл бұрын
great. Blew my mind how you can do it in so little lines ! :)
@manashdey8765
@manashdey8765 3 жыл бұрын
Very nice explanation sir 😊.. thank you ,
@anshu_raj_
@anshu_raj_ Жыл бұрын
Thank you so much
@2hp_logam498
@2hp_logam498 2 жыл бұрын
why is there n + 1 ?
@flamazx1
@flamazx1 3 жыл бұрын
Earned a suscriber, thanks!!!!
@kudakwashechirinda5652
@kudakwashechirinda5652 3 жыл бұрын
Thanks this is really helpful
@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?
@mechtutorcom
@mechtutorcom Жыл бұрын
Thank you for watching. To see my new online course, click here: mechtutor.thinkific.com/courses/python-for-science-and-engineering
@amvro23
@amvro23 Жыл бұрын
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)
@user-gs6nx7jh5j
@user-gs6nx7jh5j 3 жыл бұрын
Very useful! Thanks a lot!
@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
@hadimajdi9272
@hadimajdi9272 3 жыл бұрын
spectacular , thank you so much
@Matchless_gift
@Matchless_gift 4 жыл бұрын
Great work sir#mathsbeetle
@karimlimos8541
@karimlimos8541 4 жыл бұрын
thank you sir for this video
@agustinhernandez4261
@agustinhernandez4261 3 жыл бұрын
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 3 жыл бұрын
cuz then i have to integrate it
@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 +=
@erfanjavaheri398
@erfanjavaheri398 Жыл бұрын
Sir i want for n points how can i do that?
@farhanrafid8584
@farhanrafid8584 4 жыл бұрын
thank you so much.
@purib3992
@purib3992 3 жыл бұрын
can you write code for differentiation to Lagrange's formula
@sugandhasingh3833
@sugandhasingh3833 2 жыл бұрын
how to implement same method for any image?
@isaacfernandez2243
@isaacfernandez2243 2 жыл бұрын
how can I calculate the error?
@HuongHoang-ez9si
@HuongHoang-ez9si 4 жыл бұрын
ppval..Is this the method?
@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
@nicsim7469
@nicsim7469 4 жыл бұрын
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
@ayushigarewal
@ayushigarewal Жыл бұрын
why xp=50 pls explain
@mechtutorcom
@mechtutorcom Жыл бұрын
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.
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 29 МЛН
Matching Picture Challenge with Alfredo Larin's family! 👍
00:37
BigSchool
Рет қаралды 49 МЛН
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 12 МЛН
Lagrange Interpolation
6:54
Dr. Will Wood
Рет қаралды 138 М.
Polynomial Regression in Python
20:18
NeuralNine
Рет қаралды 45 М.
Lagrange Polynomial Interpolation Introduction | Numerical Methods
5:18
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
The Python Function You NEED For 2D Data
10:49
Mr. P Solver
Рет қаралды 36 М.
Monte Carlo Integration In Python For Noobs
15:32
Andrew Dotson
Рет қаралды 151 М.
Newton Interpolation and Divided Differences
14:03
Dr. Will Wood
Рет қаралды 35 М.
A Simple Solution for Really Hard Problems: Monte Carlo Simulation
5:58
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 29 МЛН