Meaning of InterpolationOrder -> All for multidimensional interpolation Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How to get zeroth-order (piecewise constant) interpolation of scattered data?Interpolation of multidimensional data organized logarithmicallyMultidimensional interpolation with duplicate abscissa valuesSeries expansion of InterpolatingFunction obtained from NDSolveMultidimensional Interpolation with 3 independent Variables with modfied data setHow does ListInterpolation work?Deleting mesh elements from a meshCustom interpolation on unstructured grid (2D, 3D)Interpolation order reduced to 1 due to unstructured grid error; yet proper syntax?Interpolation of a list defined on a region
Why is there a difference in the task/microtask execution order when a button is programmatically clicked vs DOM clicked?
Why is black pepper both grey and black?
Why do we bend a book to keep it straight?
Using et al. for a last / senior author rather than for a first author
How to find out what spells would be useless to a blind NPC spellcaster?
Is it true that "carbohydrates are of no use for the basal metabolic need"?
How to find all the available tools in macOS terminal?
Simplicity of the roots of a minimal polynomial
Is pollution the main cause of Notre Dame Cathedral's deterioration?
What is use of Files statically option into Package Designer
Apollo command module space walk?
How to deal with a team lead who never gives me credit?
Resolving to minmaj7
How can I make names more distinctive without making them longer?
What's the purpose of writing one's academic biography in the third person?
How discoverable are IPv6 addresses and AAAA names by potential attackers?
Coloring maths inside a tcolorbox
3 doors, three guards, one stone
At the end of Thor: Ragnarok why don't the Asgardians turn and head for the Bifrost as per their original plan?
What does the "x" in "x86" represent?
How does the particle を relate to the verb 行く in the structure「A を + B に行く」?
Can a non-EU citizen traveling with me come with me through the EU passport line?
String `!23` is replaced with `docker` in command line
sh script name -sh: /bin/sh^M: bad interpreter: No such file or directory
Meaning of InterpolationOrder -> All for multidimensional interpolation
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How to get zeroth-order (piecewise constant) interpolation of scattered data?Interpolation of multidimensional data organized logarithmicallyMultidimensional interpolation with duplicate abscissa valuesSeries expansion of InterpolatingFunction obtained from NDSolveMultidimensional Interpolation with 3 independent Variables with modfied data setHow does ListInterpolation work?Deleting mesh elements from a meshCustom interpolation on unstructured grid (2D, 3D)Interpolation order reduced to 1 due to unstructured grid error; yet proper syntax?Interpolation of a list defined on a region
$begingroup$
What specific method does Interpolation use for unstructured multi-dimensional data when we set InterpolationOrder -> All? Documentation links are welcome.
Example 2D data:
data = RandomReal[1, 20, 3];
When the data points are not on a grid, the only allowed settings for InterpolationOrder are 1 and All, according to the error message issued when trying something else.
With 1, it is clear how it works: a Delaunay triangulation is computed and linear interpolation is done over each triangle.
But how does All work, and what determines the actual order that is chosen?
if = Interpolation[data, InterpolationOrder -> All];
if["InterpolationOrder"]
(* 5 *)
Show[
Plot3D[if[x, y], x, 0, 1, y, 0, 1],
Graphics3D[PointSize[Large], Point[data]]
]

interpolation
$endgroup$
add a comment |
$begingroup$
What specific method does Interpolation use for unstructured multi-dimensional data when we set InterpolationOrder -> All? Documentation links are welcome.
Example 2D data:
data = RandomReal[1, 20, 3];
When the data points are not on a grid, the only allowed settings for InterpolationOrder are 1 and All, according to the error message issued when trying something else.
With 1, it is clear how it works: a Delaunay triangulation is computed and linear interpolation is done over each triangle.
But how does All work, and what determines the actual order that is chosen?
if = Interpolation[data, InterpolationOrder -> All];
if["InterpolationOrder"]
(* 5 *)
Show[
Plot3D[if[x, y], x, 0, 1, y, 0, 1],
Graphics3D[PointSize[Large], Point[data]]
]

interpolation
$endgroup$
$begingroup$
Dunno, but the return value ofif["InterpolationOrder"]that I get is9223372036854775806, 9223372036854775806. Oo
$endgroup$
– Henrik Schumacher
9 hours ago
1
$begingroup$
@HenrikSchumacher Oops ... It seems I tried this with M12.0 (it's available in the cloud).
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
Anyways, very good questions. I am also curious what works there in the background.
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
@HenrikSchumacher If this gives a hint, starting from 4 data points, the first 3 data point counts get interpolation order 2, then the next 4 get 3, then the next 5 get 4, etc.
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
That sounds as if they were using straight-forward global interpolation by a polynomial of degree up ton. Then you haveBinomial[n, 2]basis functions. In that case, this should become nasty for higher point counts due to Runge's phenomenon and ill-conditioned linear systems (for solving for the coefficients). So I presume, that they will switch to another method when the point count becomes larger...
$endgroup$
– Henrik Schumacher
9 hours ago
add a comment |
$begingroup$
What specific method does Interpolation use for unstructured multi-dimensional data when we set InterpolationOrder -> All? Documentation links are welcome.
Example 2D data:
data = RandomReal[1, 20, 3];
When the data points are not on a grid, the only allowed settings for InterpolationOrder are 1 and All, according to the error message issued when trying something else.
With 1, it is clear how it works: a Delaunay triangulation is computed and linear interpolation is done over each triangle.
But how does All work, and what determines the actual order that is chosen?
if = Interpolation[data, InterpolationOrder -> All];
if["InterpolationOrder"]
(* 5 *)
Show[
Plot3D[if[x, y], x, 0, 1, y, 0, 1],
Graphics3D[PointSize[Large], Point[data]]
]

interpolation
$endgroup$
What specific method does Interpolation use for unstructured multi-dimensional data when we set InterpolationOrder -> All? Documentation links are welcome.
Example 2D data:
data = RandomReal[1, 20, 3];
When the data points are not on a grid, the only allowed settings for InterpolationOrder are 1 and All, according to the error message issued when trying something else.
With 1, it is clear how it works: a Delaunay triangulation is computed and linear interpolation is done over each triangle.
But how does All work, and what determines the actual order that is chosen?
if = Interpolation[data, InterpolationOrder -> All];
if["InterpolationOrder"]
(* 5 *)
Show[
Plot3D[if[x, y], x, 0, 1, y, 0, 1],
Graphics3D[PointSize[Large], Point[data]]
]

interpolation
interpolation
asked 9 hours ago
SzabolcsSzabolcs
164k14448950
164k14448950
$begingroup$
Dunno, but the return value ofif["InterpolationOrder"]that I get is9223372036854775806, 9223372036854775806. Oo
$endgroup$
– Henrik Schumacher
9 hours ago
1
$begingroup$
@HenrikSchumacher Oops ... It seems I tried this with M12.0 (it's available in the cloud).
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
Anyways, very good questions. I am also curious what works there in the background.
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
@HenrikSchumacher If this gives a hint, starting from 4 data points, the first 3 data point counts get interpolation order 2, then the next 4 get 3, then the next 5 get 4, etc.
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
That sounds as if they were using straight-forward global interpolation by a polynomial of degree up ton. Then you haveBinomial[n, 2]basis functions. In that case, this should become nasty for higher point counts due to Runge's phenomenon and ill-conditioned linear systems (for solving for the coefficients). So I presume, that they will switch to another method when the point count becomes larger...
$endgroup$
– Henrik Schumacher
9 hours ago
add a comment |
$begingroup$
Dunno, but the return value ofif["InterpolationOrder"]that I get is9223372036854775806, 9223372036854775806. Oo
$endgroup$
– Henrik Schumacher
9 hours ago
1
$begingroup$
@HenrikSchumacher Oops ... It seems I tried this with M12.0 (it's available in the cloud).
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
Anyways, very good questions. I am also curious what works there in the background.
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
@HenrikSchumacher If this gives a hint, starting from 4 data points, the first 3 data point counts get interpolation order 2, then the next 4 get 3, then the next 5 get 4, etc.
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
That sounds as if they were using straight-forward global interpolation by a polynomial of degree up ton. Then you haveBinomial[n, 2]basis functions. In that case, this should become nasty for higher point counts due to Runge's phenomenon and ill-conditioned linear systems (for solving for the coefficients). So I presume, that they will switch to another method when the point count becomes larger...
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
Dunno, but the return value of
if["InterpolationOrder"] that I get is 9223372036854775806, 9223372036854775806. Oo$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
Dunno, but the return value of
if["InterpolationOrder"] that I get is 9223372036854775806, 9223372036854775806. Oo$endgroup$
– Henrik Schumacher
9 hours ago
1
1
$begingroup$
@HenrikSchumacher Oops ... It seems I tried this with M12.0 (it's available in the cloud).
$endgroup$
– Szabolcs
9 hours ago
$begingroup$
@HenrikSchumacher Oops ... It seems I tried this with M12.0 (it's available in the cloud).
$endgroup$
– Szabolcs
9 hours ago
1
1
$begingroup$
Anyways, very good questions. I am also curious what works there in the background.
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
Anyways, very good questions. I am also curious what works there in the background.
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
@HenrikSchumacher If this gives a hint, starting from 4 data points, the first 3 data point counts get interpolation order 2, then the next 4 get 3, then the next 5 get 4, etc.
$endgroup$
– Szabolcs
9 hours ago
$begingroup$
@HenrikSchumacher If this gives a hint, starting from 4 data points, the first 3 data point counts get interpolation order 2, then the next 4 get 3, then the next 5 get 4, etc.
$endgroup$
– Szabolcs
9 hours ago
1
1
$begingroup$
That sounds as if they were using straight-forward global interpolation by a polynomial of degree up to
n. Then you have Binomial[n, 2] basis functions. In that case, this should become nasty for higher point counts due to Runge's phenomenon and ill-conditioned linear systems (for solving for the coefficients). So I presume, that they will switch to another method when the point count becomes larger...$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
That sounds as if they were using straight-forward global interpolation by a polynomial of degree up to
n. Then you have Binomial[n, 2] basis functions. In that case, this should become nasty for higher point counts due to Runge's phenomenon and ill-conditioned linear systems (for solving for the coefficients). So I presume, that they will switch to another method when the point count becomes larger...$endgroup$
– Henrik Schumacher
9 hours ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
This is code that has been written many moons ago... first an example:
d = 0.4138352728412389, 0.02365673668161028, 0.5509946389658635,
0.7254061374370833, 0.14521595926324116,
0.6528630823305817, 0.48768962246740544,
0.22066264105073286, 0.8309710560928056,
0.3496966364384875, 0.4553589220242207,
0.9383446951847001, 0.2126873262146789,
0.017512080396716145, 0.967248982535015,
0.6211273372083488, 0.3548669163916416,
0.737108322193581, 0.6919974835480842, 0.9322403408098401;
f = 0.9953617542392983, 0.14070666511222818,
0.285662339441511, 0.7988192898854105, 0.3592646208757597,
0.565455746009103, 0.22110814761432618, 0.2735048548887764,
0.08792348530403005, 0.4202942851818514;
data = Join[d, f, 2];
if = Interpolation[data, InterpolationOrder -> All];
if[0.5, 0.5]
0.268157
And here is roughly what it does:
dt = Transpose[d];
temp = Join[ConstantArray[1., Length[d]], dt, dt[[1]]^2,
dt[[1]]*dt[[2]], dt[[2]]^2, dt[[1]]^3,
dt[[1]]^2*dt[[2]], dt[[1]]*dt[[2]]^2, dt[[2]]^3];
p = Transpose[temp];
ls = LinearSolve[p];
vals = ls[Flatten[f]];
System`Private`EvaluateListPolynomial[vals, 0.5, 0.5]
0.268157
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f195279%2fmeaning-of-interpolationorder-all-for-multidimensional-interpolation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
This is code that has been written many moons ago... first an example:
d = 0.4138352728412389, 0.02365673668161028, 0.5509946389658635,
0.7254061374370833, 0.14521595926324116,
0.6528630823305817, 0.48768962246740544,
0.22066264105073286, 0.8309710560928056,
0.3496966364384875, 0.4553589220242207,
0.9383446951847001, 0.2126873262146789,
0.017512080396716145, 0.967248982535015,
0.6211273372083488, 0.3548669163916416,
0.737108322193581, 0.6919974835480842, 0.9322403408098401;
f = 0.9953617542392983, 0.14070666511222818,
0.285662339441511, 0.7988192898854105, 0.3592646208757597,
0.565455746009103, 0.22110814761432618, 0.2735048548887764,
0.08792348530403005, 0.4202942851818514;
data = Join[d, f, 2];
if = Interpolation[data, InterpolationOrder -> All];
if[0.5, 0.5]
0.268157
And here is roughly what it does:
dt = Transpose[d];
temp = Join[ConstantArray[1., Length[d]], dt, dt[[1]]^2,
dt[[1]]*dt[[2]], dt[[2]]^2, dt[[1]]^3,
dt[[1]]^2*dt[[2]], dt[[1]]*dt[[2]]^2, dt[[2]]^3];
p = Transpose[temp];
ls = LinearSolve[p];
vals = ls[Flatten[f]];
System`Private`EvaluateListPolynomial[vals, 0.5, 0.5]
0.268157
$endgroup$
add a comment |
$begingroup$
This is code that has been written many moons ago... first an example:
d = 0.4138352728412389, 0.02365673668161028, 0.5509946389658635,
0.7254061374370833, 0.14521595926324116,
0.6528630823305817, 0.48768962246740544,
0.22066264105073286, 0.8309710560928056,
0.3496966364384875, 0.4553589220242207,
0.9383446951847001, 0.2126873262146789,
0.017512080396716145, 0.967248982535015,
0.6211273372083488, 0.3548669163916416,
0.737108322193581, 0.6919974835480842, 0.9322403408098401;
f = 0.9953617542392983, 0.14070666511222818,
0.285662339441511, 0.7988192898854105, 0.3592646208757597,
0.565455746009103, 0.22110814761432618, 0.2735048548887764,
0.08792348530403005, 0.4202942851818514;
data = Join[d, f, 2];
if = Interpolation[data, InterpolationOrder -> All];
if[0.5, 0.5]
0.268157
And here is roughly what it does:
dt = Transpose[d];
temp = Join[ConstantArray[1., Length[d]], dt, dt[[1]]^2,
dt[[1]]*dt[[2]], dt[[2]]^2, dt[[1]]^3,
dt[[1]]^2*dt[[2]], dt[[1]]*dt[[2]]^2, dt[[2]]^3];
p = Transpose[temp];
ls = LinearSolve[p];
vals = ls[Flatten[f]];
System`Private`EvaluateListPolynomial[vals, 0.5, 0.5]
0.268157
$endgroup$
add a comment |
$begingroup$
This is code that has been written many moons ago... first an example:
d = 0.4138352728412389, 0.02365673668161028, 0.5509946389658635,
0.7254061374370833, 0.14521595926324116,
0.6528630823305817, 0.48768962246740544,
0.22066264105073286, 0.8309710560928056,
0.3496966364384875, 0.4553589220242207,
0.9383446951847001, 0.2126873262146789,
0.017512080396716145, 0.967248982535015,
0.6211273372083488, 0.3548669163916416,
0.737108322193581, 0.6919974835480842, 0.9322403408098401;
f = 0.9953617542392983, 0.14070666511222818,
0.285662339441511, 0.7988192898854105, 0.3592646208757597,
0.565455746009103, 0.22110814761432618, 0.2735048548887764,
0.08792348530403005, 0.4202942851818514;
data = Join[d, f, 2];
if = Interpolation[data, InterpolationOrder -> All];
if[0.5, 0.5]
0.268157
And here is roughly what it does:
dt = Transpose[d];
temp = Join[ConstantArray[1., Length[d]], dt, dt[[1]]^2,
dt[[1]]*dt[[2]], dt[[2]]^2, dt[[1]]^3,
dt[[1]]^2*dt[[2]], dt[[1]]*dt[[2]]^2, dt[[2]]^3];
p = Transpose[temp];
ls = LinearSolve[p];
vals = ls[Flatten[f]];
System`Private`EvaluateListPolynomial[vals, 0.5, 0.5]
0.268157
$endgroup$
This is code that has been written many moons ago... first an example:
d = 0.4138352728412389, 0.02365673668161028, 0.5509946389658635,
0.7254061374370833, 0.14521595926324116,
0.6528630823305817, 0.48768962246740544,
0.22066264105073286, 0.8309710560928056,
0.3496966364384875, 0.4553589220242207,
0.9383446951847001, 0.2126873262146789,
0.017512080396716145, 0.967248982535015,
0.6211273372083488, 0.3548669163916416,
0.737108322193581, 0.6919974835480842, 0.9322403408098401;
f = 0.9953617542392983, 0.14070666511222818,
0.285662339441511, 0.7988192898854105, 0.3592646208757597,
0.565455746009103, 0.22110814761432618, 0.2735048548887764,
0.08792348530403005, 0.4202942851818514;
data = Join[d, f, 2];
if = Interpolation[data, InterpolationOrder -> All];
if[0.5, 0.5]
0.268157
And here is roughly what it does:
dt = Transpose[d];
temp = Join[ConstantArray[1., Length[d]], dt, dt[[1]]^2,
dt[[1]]*dt[[2]], dt[[2]]^2, dt[[1]]^3,
dt[[1]]^2*dt[[2]], dt[[1]]*dt[[2]]^2, dt[[2]]^3];
p = Transpose[temp];
ls = LinearSolve[p];
vals = ls[Flatten[f]];
System`Private`EvaluateListPolynomial[vals, 0.5, 0.5]
0.268157
answered 7 hours ago
user21user21
20.1k45386
20.1k45386
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f195279%2fmeaning-of-interpolationorder-all-for-multidimensional-interpolation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
-interpolation
$begingroup$
Dunno, but the return value of
if["InterpolationOrder"]that I get is9223372036854775806, 9223372036854775806. Oo$endgroup$
– Henrik Schumacher
9 hours ago
1
$begingroup$
@HenrikSchumacher Oops ... It seems I tried this with M12.0 (it's available in the cloud).
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
Anyways, very good questions. I am also curious what works there in the background.
$endgroup$
– Henrik Schumacher
9 hours ago
$begingroup$
@HenrikSchumacher If this gives a hint, starting from 4 data points, the first 3 data point counts get interpolation order 2, then the next 4 get 3, then the next 5 get 4, etc.
$endgroup$
– Szabolcs
9 hours ago
1
$begingroup$
That sounds as if they were using straight-forward global interpolation by a polynomial of degree up to
n. Then you haveBinomial[n, 2]basis functions. In that case, this should become nasty for higher point counts due to Runge's phenomenon and ill-conditioned linear systems (for solving for the coefficients). So I presume, that they will switch to another method when the point count becomes larger...$endgroup$
– Henrik Schumacher
9 hours ago