# a mapping function is requested

I have $n$ data points in $d$-dimensional space, i.e $x_1,x_2,...x_n$ where $x_i\in R^d$. I want an interpolation function $f:R^d-> R$ on these data points to map them to $y_1,y_2,...,y_n$, where $y_i=f(x_i)$. In other words, I require an extension to Lagrange interpolation method for $d$ dimensional space.

-

## 1 Answer

Let $l_{i,j}:\mathbb{R}\rightarrow\mathbb{R}$ for $j=1,\dots,d$ be the Lagrange basis polynomials for the data $(x_i^{(j)})_i$, i.e. $l_{i,j}(x^{(j)}_k)=1$ if $k=i$ and $0$ otherwise. Then the polynomial in $d$ variables given by

$$L(x):=\sum^n_{i=1} y_i\left(\prod^d_{j=1}l_{i,j}(x^{(j)})\right)$$

is what you are looking for (just plug in the $x_i$): $L(x_i)=y_i$. Note however, that the Lagrange polynomials has some undesirable properties (fast oscillation in between the points fixed by the data, doesn't extrapolate well, ..). So depending on your problem, you might also want to look into other interpolation methods (Bezier curves, etc.).

-

Thank you for your answer. – remo Oct 14 '12 at 15:01
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 17, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8739175796508789, "perplexity_flag": "head"}