# Can the Lagrange Interpolating polynomial be used in a machine learning algorithm?

My understanding of the Lagrange interpolating polynomial is that given $\space n \space$ points, we can fit a polynomial of degree $\space n+1 \space$ as a means of approximating the values between the points.

This polynomial is defined as:

$$L_n(x) = {(x-x_1)(x-x_2)...(x-x_n) \over (x_0-x_1)(x_0-x_2)...(x_0-x_n)}y_0 +...+ {(x-x_1)(x-x_2)...(x-x_{n-1}) \over (x_n-x_1)(x_n-x_2)...(x_n-x_{n-1})}y_n$$

Could this be more reliable in a machine learning algorithm that deals with one numerical input and one numerical output, where the training data is a set of points $\space (x,y) \space$, with $\space x=input \space$ and $\space y=output \space$ . Rather than using neural networks?

• First, the Lagrange form is really bad to actually evaluate for $n$ larger than about $5$. There are better representations of the same polynomial, such as the Newton form, out there. Second, the big problem with exact interpolating polynomials of high degree (rather than, for example, inexact interpolating polynomials of low degree, or spline polynomials with low degree pieces) is large oscillations in between nodes. As a result you tend to get very inaccurate results for predictions of outputs from inputs in between the nodes. – Ian Aug 25 '18 at 14:20
• @Ian - Ahh I figured your second point would be an issue but wasn't too sure. Thank you for the clear and concise response :) – UndercoverCoder Aug 25 '18 at 14:27