1
$\begingroup$

I'm having trouble with interpolation and I think it may be due to how my data set is sorted.

I'm getting the error "Interpolation::udeg: Interpolation on unstructured grids is currently only supported for InterpolationOrder->1 or InterpolationOrder->All. Order will be reduced to 1."

I read here https://community.wolfram.com/groups/-/m/t/777582 that this can be solved by rearranging the data using Sort[] (there are no duplicates in my data set). I cannot seem to figure this out for my data set though which is in 4D. Any suggestions are very greatly appreciated. My data set is of the form

x      y     z     loss
val1  val2  val3   val4

Here is some of my data:

data = {{{4.0, 2.5, 0.7}, 0.750341814}, {{4.0, 2.75, 0.7}, 
0.641510140}, {{4.0, 3.0, 0.7}, 0.622998451}, {{4.5, 2.3, 0.7}, 
0.730188891}, {{4.5, 2.6, 0.7}, 0.236956251}, {{4.5, 3.2, 0.7}, 
0.092038571}, {{4.5, 3.5, 0.7}, 0.088483203}, {{5.0, 2.25, 0.7}, 
0.948879277}, {{5.0, 2.6, 0.7}, 0.190624075}, {{5.0, 2.95, 0.7}, 
0.135275036}, {{5.0, 3.3, 0.7}, 0.032763743}, {{5.0, 3.65, 0.7}, 
0.029430211}, {{5.0, 4.0, 0.7}, 0.027537075}, {{5.5, 2.5, 0.7}, 
0.281232137}, {{5.5, 2.9, 0.7}, 0.054980707}, {{5.5, 3.3, 0.7}, 
0.023085488}, {{5.5, 3.7, 0.7}, 0.031317836}, {{5.5, 4.1, 0.7}, 
0.010820878}, {{5.5, 4.5, 0.7}, 0.010161860}, {{6.0, 2.3, 0.7}, 
0.397089577}, {{6.0, 2.75, 0.7}, 0.074292346}, {{6.0, 3.2, 0.7}, 
0.015918433}, {{6.0, 3.65, 0.7}, 0.004494633}, {{6.0, 4.1, 0.7}, 
0.002195262}, {{6.0, 4.55, 0.7}, 0.001750180}, {{6.0, 5.0, 0.7}, 
0.001701018}, {{6.5, 2.5, 0.7}, 0.322173220}, {{6.5, 3.0, 0.7}, 
0.037894300}, {{6.5, 3.5, 0.7}, 0.005178418}, {{6.5, 4.0, 0.7}, 
0.001170227}, {{6.5, 4.5, 0.7}, 0.001044620}, {{6.5, 5.0, 0.7}, 
0.000228311}, {{6.5, 5.5, 0.7}, 0.000204873}, {{7.0, 2.15, 0.7}, 
0.799562745}, {{7.0, 2.7, 0.7}, 0.169379167}, {{7.0, 3.25, 0.7}, 
0.019800399}, {{7.0, 3.8, 0.7}, 0.001902681}, {{7.0, 4.35, 0.7}, 
0.000501842}, {{7.0, 4.9, 0.7}, 0.000126206}, {{7.0, 5.45, 0.7}, 
0.000026700}, {{7.0, 6.0, 0.7}, 0.000020600}, {{7.5, 2.3, 0.7}, 
1.215594070}, {{7.5, 2.9, 0.7}, 0.050740772}, {{7.5, 3.5, 0.7}, 
0.009225684}, {{7.5, 4.1, 0.7}, 0.000752695}, {{7.5, 4.7, 0.7}, 
0.000144944}, {{7.5, 5.3, 0.7}, 0.000016200}, {{7.5, 5.9, 0.7}, 
0.000003720}, {{7.5, 6.5, 0.7}, 0.000002670}, {{8.0, 2.45, 0.7}, 
0.316357500}, {{8.0, 3.1, 0.7}, 0.049589355}, {{8.0, 3.75, 0.7}, 
0.001624453}, {{8.0, 4.4, 0.7}, 0.000321852}, {{8.0, 5.05, 0.7}, 
0.000043800}, {{8.0, 5.7, 0.7}, 0.000003320}, {{8.0, 6.35, 0.7}, 
0.000001040}, {{8.0, 7.0, 0.7}, 0.000000425}, {{4.0, 2.0, 0.83}, 
1.123030977}, {{4.0, 2.25, 0.83}, 0.643862594}, {{4.0, 2.5, 0.83},
 0.494527641}, {{4.0, 2.75, 0.83}, 
0.460772203}, {{4.0, 3.0, 0.83}, 0.449952666}, {{4.5, 2.0, 0.83}, 
1.177597462}, {{4.5, 2.3, 0.83}, 0.246286304}, {{4.5, 2.6, 0.83}, 
0.126303219}, {{4.5, 2.9, 0.83}, 0.805843164}, {{4.5, 3.2, 0.83}, 
0.064124542}, {{4.5, 3.5, 0.83}, 0.063221002}, {{5.0, 1.9, 0.83}, 
0.959095797}, {{5.0, 2.25, 0.83}, 0.395763200}, {{5.0, 2.6, 0.83},
 0.068053440}, {{5.0, 2.95, 0.83}, 
0.058924421}, {{5.0, 3.3, 0.83}, 0.018638068}, {{5.0, 3.65, 0.83},
 0.016715326}, {{5.0, 4.0, 0.83}, 0.016485697}, {{5.5, 2.1, 0.83},
 0.801945073}, {{5.5, 2.5, 0.83}, 0.121609842}, {{5.5, 2.9, 0.83},
 0.022526237}, {{5.5, 3.3, 0.83}, 0.010862152}, {{5.5, 3.7, 0.83},
 0.010286207}, {{5.5, 4.1, 0.83}, 0.007491423}, {{5.5, 4.5, 0.83},
 0.007211895}, {{6.0, 2.3, 0.83}, 
0.160576165}, {{6.0, 2.75, 0.83}, 0.029644050}, {{6.0, 3.2, 0.83},
 0.007040139}, {{6.0, 3.65, 0.83}, 
0.003064983}, {{6.0, 4.1, 0.83}, 0.002347885}, {{6.0, 4.55, 0.83},
 0.002231154}, {{6.0, 5.0, 0.83}, 0.002229741}, {{6.5, 2.0, 0.83},
 0.743003719}, {{6.5, 2.5, 0.83}, 0.091745464}, {{6.5, 3.0, 0.83},
 0.011634382}, {{6.5, 3.5, 0.83}, 0.001858806}, {{6.5, 4.0, 0.83},
 0.000625568}, {{6.5, 4.5, 0.83}, 0.000476692}, {{6.5, 5.0, 0.83},
 0.000270385}, {{6.5, 5.5, 0.83}, 
0.000263443}, {{7.0, 2.15, 0.83}, 0.289692249}, {{7.0, 2.7, 0.83},
 0.070986865}, {{7.0, 3.25, 0.83}, 
0.005445419}, {{7.0, 3.8, 0.83}, 0.000569259}, {{7.0, 4.35, 0.83},
 0.000184639}, {{7.0, 4.9, 0.83}, 
0.000050600}, {{7.0, 5.45, 0.83}, 0.000019100}, {{7.0, 6.0, 0.83},
 0.000017700}, {{7.5, 2.3, 0.83}, 0.427847385}, {{7.5, 2.9, 0.83},
 0.016100380}, {{7.5, 3.5, 0.83}, 0.003665870}, {{7.5, 4.1, 0.83},
 0.000201233}, {{7.5, 4.7, 0.83}, 0.000060600}, {{7.5, 5.3, 0.83},
 0.000005190}, {{7.5, 5.9, 0.83}, 0.000002460}, {{7.5, 6.5, 0.83},
 0.000002090}, {{8.0, 2.45, 0.83}, 
0.096275542}, {{8.0, 3.1, 0.83}, 0.017935820}, {{8.0, 3.75, 0.83},
 0.000604182}, {{8.0, 4.4, 0.83}, 
0.000079200}, {{8.0, 5.05, 0.83}, 0.000017500}, {{8.0, 5.7, 0.83},
 0.000000999}, {{8.0, 6.35, 0.83}, 
0.000000476}, {{8.0, 7.0, 0.83}, 0.000000303}, {{4.0, 2.25, 0.96},
 1.177242345}, {{4.0, 2.5, 0.96}, 
0.903436502}, {{4.0, 2.75, 0.96}, 0.332421564}, {{4.0, 3.0, 0.96},
 0.328294859}, {{4.5, 2.0, 0.96}, 0.610951015}, {{4.5, 2.3, 0.96},
 0.673977792}, {{4.5, 2.6, 0.96}, 0.108851985}, {{4.5, 2.9, 0.96},
 0.125798036}, {{4.5, 3.2, 0.96}, 0.164368921}, {{4.5, 3.5, 0.96},
 0.083522130}, {{5.0, 2.25, 0.96}, 
0.173705123}, {{5.0, 2.6, 0.96}, 0.414522040}, {{5.0, 2.95, 0.96},
 0.197962721}, {{5.0, 3.3, 0.96}, 
0.025581569}, {{5.0, 3.65, 0.96}, 0.026675785}, {{5.0, 4.0, 0.96},
 0.025212890}, {{5.5, 2.1, 0.96}, 0.441425969}, {{5.5, 2.5, 0.96},
 0.044996441}, {{5.5, 2.9, 0.96}, 0.306236219}, {{5.5, 3.3, 0.96},
 0.010891276}, {{5.5, 3.7, 0.96}, 0.006561283}, {{5.5, 4.1, 0.96},
 0.000851567}, {{5.5, 4.5, 0.96}, 
0.000718190}, {{6.0, 1.85, 0.96}, 0.807149508}, {{6.0, 2.3, 0.96},
 0.065261072}, {{6.0, 2.75, 0.96}, 
0.062784999}, {{6.0, 3.2, 0.96}, 0.073790906}, {{6.0, 3.65, 0.96},
 0.013393139}, {{6.0, 4.1, 0.96}, 
0.002261782}, {{6.0, 4.55, 0.96}, 0.001243003}, {{6.0, 5.0, 0.96},
 0.001121045}, {{6.5, 2.0, 0.96}, 1.145752994}, {{6.5, 2.5, 0.96},
 0.190715368}, {{6.5, 3.0, 0.96}, 0.039221201}, {{6.5, 3.5, 0.96},
 0.023321520}, {{6.5, 4.0, 0.96}, 0.000322579}, {{6.5, 4.5, 0.96},
 0.000220124}, {{6.5, 5.0, 0.96}, 0.000187539}, {{6.5, 5.5, 0.96},
 0.000196152}, {{7.0, 2.15, 0.96}, 
0.554272538}, {{7.0, 2.7, 0.96}, 0.028907939}, {{7.0, 3.25, 0.96},
 0.009721355}, {{7.0, 3.8, 0.96}, 
0.002695021}, {{7.0, 4.35, 0.96}, 0.000084600}, {{7.0, 4.9, 0.96},
 0.000142253}, {{7.0, 5.45, 0.96}, 
0.000037600}, {{7.0, 6.0, 0.96}, 0.000034100}, {{7.5, 2.3, 0.96}, 
0.790029329}, {{7.5, 2.9, 0.96}, 0.072060300}, {{7.5, 3.5, 0.96}, 
0.001543552}, {{7.5, 4.1, 0.96}, 0.000462893}, {{7.5, 4.7, 0.96}, 
0.000071200}, {{7.5, 5.3, 0.96}, 0.000007440}, {{7.5, 5.9, 0.96}, 
0.000002120}, {{7.5, 6.5, 0.96}, 0.000002050}, {{8.0, 2.45, 0.96},
 0.282324098}, {{8.0, 3.1, 0.96}, 
0.031273184}, {{8.0, 3.75, 0.96}, 0.000254968}, {{8.0, 4.4, 0.96},
 0.000129261}, {{8.0, 5.05, 0.96}, 
0.000019400}, {{8.0, 5.7, 0.96}, 0.000002140}, {{8.0, 6.35, 0.96},
 0.000000583}, {{8.0, 7.0, 0.96}, 
0.000000352}, {{4.0, 1.25, 1.09}, 
1.033148314}, {{4.0, 1.75, 1.09}, 0.740160273}, {{4.0, 2.0, 1.09},
 0.529269079}, {{4.0, 2.25, 1.09}, 
0.461266052}, {{4.0, 2.5, 1.09}, 0.436974232}, {{4.0, 2.75, 1.09},
 0.431270170}, {{4.0, 3.0, 1.09}, 0.429508335}, {{4.5, 1.1, 1.09},
 1.444961498}, {{4.5, 1.4, 1.09}, 0.686333174}, {{4.5, 1.7, 1.09},
 0.241340533}, {{4.5, 2.0, 1.09}, 0.196898525}, {{4.5, 2.3, 1.09},
 0.090722188}, {{4.5, 2.6, 1.09}, 0.069625379}, {{4.5, 2.9, 1.09},
 0.164346767}, {{4.5, 3.2, 1.09}, 0.060310736}, {{4.5, 3.5, 1.09},
 0.060043745}, {{5.0, 0.85, 1.09}, 
1.478790428}, {{5.0, 1.55, 1.09}, 0.907162911}, {{5.0, 1.9, 1.09},
 0.146692652}, {{5.0, 2.25, 1.09}, 
0.068423553}, {{5.0, 2.6, 1.09}, 0.025861641}, {{5.0, 2.95, 1.09},
 0.024262986}, {{5.0, 3.3, 1.09}, 
0.017117017}, {{5.0, 3.65, 1.09}, 0.016828180}, {{5.0, 4.0, 1.09},
 0.016720068}, {{5.5, 0.9, 1.09}, 1.265758324}, {{5.5, 1.3, 1.09},
 0.615352589}, {{5.5, 1.7, 1.09}, 0.272605302}, {{5.5, 2.1, 1.09},
 0.110488788}, {{5.5, 2.5, 1.09}, 0.024200467}, {{5.5, 2.9, 1.09},
 0.009994316}, {{5.5, 3.3, 1.09}, 0.008007375}, {{5.5, 3.7, 1.09},
 0.008099490}, {{5.5, 4.1, 1.09}, 0.007302080}, {{5.5, 4.5, 1.09},
 0.007260204}, {{6.0, 1.4, 1.09}, 
0.596231650}, {{6.0, 1.85, 1.09}, 0.330616964}, {{6.0, 2.3, 1.09},
 0.024072686}, {{6.0, 2.75, 1.09}, 
0.006169812}, {{6.0, 3.2, 1.09}, 0.002498684}, {{6.0, 3.65, 1.09},
 0.001787953}, {{6.0, 4.1, 1.09}, 
0.001654180}, {{6.0, 4.55, 1.09}, 0.001630325}, {{6.0, 5.0, 1.09},
 0.001627483}, {{6.5, 1.5, 1.09}, 0.793631092}, {{6.5, 2.0, 1.09},
 0.110187997}, {{6.5, 2.5, 1.09}, 0.016842194}, {{6.5, 3.0, 1.09},
 0.002372415}, {{6.5, 3.5, 1.09}, 0.000474301}, {{6.5, 4.0, 1.09},
 0.000238847}, {{6.5, 4.5, 1.09}, 0.000219469}, {{6.5, 5.0, 1.09},
 0.000184626}, {{6.5, 5.5, 1.09}, 0.000183320}, {{7.0, 1.6, 1.09},
 0.308273667}, {{7.0, 2.15, 1.09}, 
0.039753513}, {{7.0, 2.7, 1.09}, 0.010966665}, {{7.0, 3.25, 1.09},
 0.001129775}, {{7.0, 3.8, 1.09}, 
0.000116910}, {{7.0, 4.35, 1.09}, 0.000039600}, {{7.0, 4.9, 1.09},
 0.000019400}, {{7.0, 5.45, 1.09}, 
0.000014700}, {{7.0, 6.0, 1.09}, 0.000014500}, {{7.5, 1.7, 1.09}, 
0.174931393}, {{7.5, 2.3, 1.09}, 0.063246102}, {{7.5, 2.9, 1.09}, 
0.002991485}, {{7.5, 3.5, 1.09}, 0.000590735}, {{7.5, 4.1, 1.09}, 
0.000039400}, {{7.5, 4.7, 1.09}, 0.000009280}, {{7.5, 5.3, 1.09}, 
0.000002210}, {{7.5, 5.9, 1.09}, 0.000001710}, {{7.5, 6.5, 1.09}, 
0.000001660}, {{8.0, 1.15, 1.09}, 1.046361422}, {{8.0, 1.8, 1.09},
 0.278122089}, {{8.0, 2.45, 1.09}, 
0.016558807}, {{8.0, 3.1, 1.09}, 0.003216437}, {{8.0, 3.75, 1.09},
 0.000098900}, {{8.0, 4.4, 1.09}, 
0.000015200}, {{8.0, 5.05, 1.09}, 0.000002450}, {{8.0, 5.7, 1.09},
 0.000000359}, {{8.0, 6.35, 1.09}, 
0.000000270}, {{8.0, 7.0, 1.09}, 0.000000247}, {{4.0, 0.75, 1.22},
 0.827405236}, {{4.0, 1.0, 1.22}, 
0.651799818}, {{4.0, 1.25, 1.22}, 0.550867055}, {{4.0, 1.5, 1.22},
 0.732196264}, {{4.0, 1.75, 1.22}, 
0.489067896}, {{4.0, 2.0, 1.22}, 0.414939439}, {{4.0, 2.25, 1.22},
 0.401083980}, {{4.0, 2.5, 1.22}, 
0.395815874}, {{4.0, 2.75, 1.22}, 0.394407293}, {{4.0, 3.0, 1.22},
 0.393721204}, {{4.5, 0.5, 1.22}, 1.397909948}, {{4.5, 0.8, 1.22},
 0.430095652}, {{4.5, 1.1, 1.22}, 0.442643913}, {{4.5, 1.4, 1.22},
 0.178154612}, {{4.5, 1.7, 1.22}, 0.103452285}, {{4.5, 2.0, 1.22},
 0.099718220}, {{4.5, 2.3, 1.22}, 0.062246389}, {{4.5, 2.6, 1.22},
 0.058320566}, {{4.5, 2.9, 1.22}, 0.092747792}, {{4.5, 3.2, 1.22},
 0.054800504}, {{4.5, 3.5, 1.22}, 0.054745922}, {{5.0, 0.5, 1.22},
 1.309233137}, {{5.0, 0.85, 1.22}, 
0.356462115}, {{5.0, 1.2, 1.22}, 0.682953245}, {{5.0, 1.55, 1.22},
 0.317639335}, {{5.0, 1.9, 1.22}, 
0.042458164}, {{5.0, 2.25, 1.22}, 0.032039914}, {{5.0, 2.6, 1.22},
 0.016271559}, {{5.0, 2.95, 1.22}, 
0.016884350}, {{5.0, 3.3, 1.22}, 0.013837963}, {{5.0, 3.65, 1.22},
 0.013699974}, {{5.0, 4.0, 1.22}, 0.013694102}, {{5.5, 0.5, 1.22},
 1.335122320}, {{5.5, 0.9, 1.22}, 0.330846608}, {{5.5, 1.3, 1.22},
 0.140418502}, {{5.5, 1.7, 1.22}, 0.060116609}, {{5.5, 2.1, 1.22},
 0.039728185}, {{5.5, 2.5, 1.22}, 0.011414314}, {{5.5, 2.9, 1.22},
 0.006026265}, {{5.5, 3.3, 1.22}, 0.005352668}, {{5.5, 3.7, 1.22},
 0.005328652}, {{5.5, 4.1, 1.22}, 0.005163881}, {{5.5, 4.5, 1.22},
 0.005145367}, {{6.0, 0.95, 1.22}, 
0.795339637}, {{6.0, 1.4, 1.22}, 0.188595524}, {{6.0, 1.85, 1.22},
 0.125782060}, {{6.0, 2.3, 1.22}, 
0.009643633}, {{6.0, 2.75, 1.22}, 0.003597316}, {{6.0, 3.2, 1.22},
 0.002332714}, {{6.0, 3.65, 1.22}, 
0.002091426}, {{6.0, 4.1, 1.22}, 0.002047402}, {{6.0, 4.55, 1.22},
 0.002040056}, {{6.0, 5.0, 1.22}, 0.002039401}, {{6.5, 1.0, 1.22},
 0.591819794}, {{6.5, 1.5, 1.22}, 0.226663321}, {{6.5, 2.0, 1.22},
 0.024100079}, {{6.5, 2.5, 1.22}, 0.004333508}, {{6.5, 3.0, 1.22},
 0.000871749}, {{6.5, 3.5, 1.22}, 0.000343949}, {{6.5, 4.0, 1.22},
 0.000269773}, {{6.5, 4.5, 1.22}, 0.000258203}, {{6.5, 5.0, 1.22},
 0.000247534}, {{6.5, 5.5, 1.22}, 0.000247053}, {{7.0, 0.5, 1.22},
 1.219115691}, {{7.0, 1.05, 1.22}, 
0.616663469}, {{7.0, 1.6, 1.22}, 0.065444788}, {{7.0, 2.15, 1.22},
 0.012306050}, {{7.0, 2.7, 1.22}, 
0.004155324}, {{7.0, 3.25, 1.22}, 0.000315723}, {{7.0, 3.8, 1.22},
 0.000053500}, {{7.0, 4.35, 1.22}, 
0.000031200}, {{7.0, 4.9, 1.22}, 0.000023300}, {{7.0, 5.45, 1.22},
 0.000021400}, {{7.0, 6.0, 1.22}, 0.000021300}, {{7.5, 1.1, 1.22},
 0.858211371}, {{7.5, 1.7, 1.22}, 0.047793211}, {{7.5, 2.3, 1.22},
 0.020568789}, {{7.5, 2.9, 1.22}, 0.000888049}, {{7.5, 3.5, 1.22},
 0.000240608}, {{7.5, 4.1, 1.22}, 0.000012700}, {{7.5, 4.7, 1.22},
 0.000005300}, {{7.5, 5.3, 1.22}, 0.000001890}, {{7.5, 5.9, 1.22},
 0.000001760}, {{7.5, 6.5, 1.22}, 0.000001740}, {{8.0, 0.5, 1.22},
 0.610123090}, {{8.0, 1.15, 1.22}, 
0.204085228}, {{8.0, 1.8, 1.22}, 0.108996109}, {{8.0, 2.45, 1.22},
 0.004407167}, {{8.0, 3.1, 1.22}, 
0.001163068}, {{8.0, 3.75, 1.22}, 0.000039000}, {{8.0, 4.4, 1.22},
 0.000004320}, {{8.0, 5.05, 1.22}, 
0.000001250}, {{8.0, 5.7, 1.22}, 0.000000274}, {{8.0, 6.35, 1.22},
 0.000000250}, {{8.0, 7.0, 1.22}, 0.000000242}, {{4.0, 0.5, 1.35},
 1.454009532}, {{4.0, 0.75, 1.35}, 
0.737302768}, {{4.0, 1.0, 1.35}, 0.695863190}, {{4.0, 1.25, 1.35},
 0.419651243}, {{4.0, 1.5, 1.35}, 
0.367032344}, {{4.0, 1.75, 1.35}, 0.350729234}, {{4.0, 2.0, 1.35},
 0.349897581}, {{4.0, 2.25, 1.35}, 
0.333441527}, {{4.0, 2.5, 1.35}, 0.341522354}, {{4.0, 2.75, 1.35},
 0.315102412}, {{4.0, 3.0, 1.35}, 0.314926583}, {{4.5, 0.5, 1.35},
 0.388560352}, {{4.5, 0.8, 1.35}, 0.487646106}, {{4.5, 1.1, 1.35},
 0.165658796}, {{4.5, 1.4, 1.35}, 0.227813004}, {{4.5, 1.7, 1.35},
 0.297338831}, {{4.5, 2.0, 1.35}, 0.094717580}, {{4.5, 2.3, 1.35},
 0.093686941}, {{4.5, 2.6, 1.35}, 0.080034287}, {{4.5, 2.9, 1.35},
 0.080633234}, {{4.5, 3.2, 1.35}, 0.080844649}, {{4.5, 3.5, 1.35},
 0.078826313}, {{5.0, 0.5, 1.35}, 
0.322520537}, {{5.0, 0.85, 1.35}, 0.707410293}, {{5.0, 1.2, 1.35},
 0.614034917}, {{5.0, 1.55, 1.35}, 
0.091899603}, {{5.0, 1.9, 1.35}, 0.066329929}, {{5.0, 2.25, 1.35},
 0.029550701}, {{5.0, 2.6, 1.35}, 
0.030453692}, {{5.0, 2.95, 1.35}, 0.029791613}, {{5.0, 3.3, 1.35},
 0.023075545}, {{5.0, 3.65, 1.35}, 
0.023114001}, {{5.0, 4.0, 1.35}, 0.023049641}, {{5.5, 0.5, 1.35}, 
0.441321244}, {{5.5, 0.9, 1.35}, 0.089405211}, {{5.5, 1.3, 1.35}, 
0.186011588}, {{5.5, 1.7, 1.35}, 0.070581961}, {{5.5, 2.1, 1.35}, 
0.014755718}, {{5.5, 2.5, 1.35}, 0.002624525}, {{5.5, 2.9, 1.35}, 
0.004911564}, {{5.5, 3.3, 1.35}, 0.001038136}, {{5.5, 3.7, 1.35}, 
0.000935360}, {{5.5, 4.1, 1.35}, 0.000608730}, {{5.5, 4.5, 1.35}, 
0.000600248}, {{6.0, 0.5, 1.35}, 0.885005228}, {{6.0, 0.95, 1.35},
 0.135485436}, {{6.0, 1.4, 1.35}, 
0.058295957}, {{6.0, 1.85, 1.35}, 0.032526734}, {{6.0, 2.3, 1.35},
 0.003598455}, {{6.0, 2.75, 1.35}, 
0.002546465}, {{6.0, 3.2, 1.35}, 0.002242820}, {{6.0, 3.65, 1.35},
 0.001139092}, {{6.0, 4.1, 1.35}, 
0.000951446}, {{6.0, 4.55, 1.35}, 0.000924755}, {{6.0, 5.0, 1.35},
 0.000920676}, {{6.5, 0.5, 1.35}, 0.263613572}, {{6.5, 1.0, 1.35},
 0.152288855}, {{6.5, 1.5, 1.35}, 0.269819439}, {{6.5, 2.0, 1.35},
 0.030683146}, {{6.5, 2.5, 1.35}, 0.006681324}, {{6.5, 3.0, 1.35},
 0.001501128}, {{6.5, 3.5, 1.35}, 0.000562310}, {{6.5, 4.0, 1.35},
 0.000185674}, {{6.5, 4.5, 1.35}, 0.000179138}, {{6.5, 5.0, 1.35},
 0.000177167}, {{6.5, 5.5, 1.35}, 0.000177332}, {{7.0, 0.5, 1.35},
 0.358269736}, {{7.0, 1.05, 1.35}, 
0.232864653}, {{7.0, 1.6, 1.35}, 0.079521231}, {{7.0, 2.15, 1.35},
 0.010670201}, {{7.0, 2.7, 1.35}, 
0.001466776}, {{7.0, 3.25, 1.35}, 0.000502468}, {{7.0, 3.8, 1.35},
 0.000109715}, {{7.0, 4.35, 1.35}, 
0.000029100}, {{7.0, 4.9, 1.35}, 0.000030100}, {{7.0, 5.45, 1.35},
 0.000026100}, {{7.0, 6.0, 1.35}, 0.000026000}, {{7.5, 0.5, 1.35},
 0.765503507}, {{7.5, 1.1, 1.35}, 0.225309312}, {{7.5, 1.7, 1.35},
 0.075578397}, {{7.5, 2.3, 1.35}, 0.035761409}, {{7.5, 2.9, 1.35},
 0.001994473}, {{7.5, 3.5, 1.35}, 0.000098300}, {{7.5, 4.1, 1.35},
 0.000023100}, {{7.5, 4.7, 1.35}, 0.000006860}, {{7.5, 5.3, 1.35},
 0.000002100}, {{7.5, 5.9, 1.35}, 0.000001850}, {{7.5, 6.5, 1.35},
 0.000001840}, {{8.0, 0.5, 1.35}, 
0.160260107}, {{8.0, 1.15, 1.35}, 0.191520629}, {{8.0, 1.8, 1.35},
 0.136761248}, {{8.0, 2.45, 1.35}, 
0.007668079}, {{8.0, 3.1, 1.35}, 0.002353801}, {{8.0, 3.75, 1.35},
 0.000016500}, {{8.0, 4.4, 1.35}, 
0.000007090}, {{8.0, 5.05, 1.35}, 0.000001720}, {{8.0, 5.7, 1.35},
 0.000000385}, {{8.0, 6.35, 1.35}, 
0.000000334}, {{8.0, 7.0, 1.35}, 0.000000318}, {{4.0, 0.5, 1.48}, 
0.470479937}, {{4.0, 0.75, 1.48}, 0.367620448}, {{4.0, 1.0, 1.48},
 0.340890658}, {{4.0, 1.25, 1.48}, 
0.317231611}, {{4.0, 1.5, 1.48}, 0.316392156}, {{4.0, 1.75, 1.48},
 0.311104152}, {{4.0, 2.0, 1.48}, 
0.307808272}, {{4.0, 2.25, 1.48}, 0.304180373}, {{4.0, 2.5, 1.48},
 0.302495782}, {{4.0, 2.75, 1.48}, 
0.301827393}, {{4.0, 3.0, 1.48}, 0.301759528}, {{4.5, 0.5, 1.48}, 
0.171581112}, {{4.5, 0.8, 1.48}, 0.148034915}, {{4.5, 1.1, 1.48}, 
0.119562673}, {{4.5, 1.4, 1.48}, 0.120956918}, {{4.5, 1.7, 1.48}, 
0.103986513}, {{4.5, 2.0, 1.48}, 0.100174635}, {{4.5, 2.3, 1.48}, 
0.097848797}, {{4.5, 2.6, 1.48}, 0.096017518}, {{4.5, 2.9, 1.48}, 
0.095956891}, {{4.5, 3.2, 1.48}, 0.095646915}, {{4.5, 3.5, 1.48}, 
0.095586057}, {{5.0, 0.5, 1.48}, 0.116857397}, {{5.0, 0.85, 1.48},
 0.074113303}, {{5.0, 1.2, 1.48}, 
0.152334944}, {{5.0, 1.55, 1.48}, 0.051069341}, {{5.0, 1.9, 1.48},
 0.038521468}, {{5.0, 2.25, 1.48}, 
0.034140043}, {{5.0, 2.6, 1.48}, 0.032123945}, {{5.0, 2.95, 1.48},
 0.034528591}, {{5.0, 3.3, 1.48}, 
0.031342263}, {{5.0, 3.65, 1.48}, 0.031338895}, {{5.0, 4.0, 1.48},
 0.031327580}, {{5.5, 0.5, 1.48}, 0.174695986}, {{5.5, 0.9, 1.48},
 0.024606063}, {{5.5, 1.3, 1.48}, 0.023593247}, {{5.5, 1.7, 1.48},
 0.013250544}, {{5.5, 2.1, 1.48}, 0.004671462}, {{5.5, 2.5, 1.48},
 0.001344497}, {{5.5, 2.9, 1.48}, 0.000927703}, {{5.5, 3.3, 1.48},
 0.000744270}, {{5.5, 3.7, 1.48}, 0.000750684}, {{5.5, 4.1, 1.48},
 0.000661253}, {{5.5, 4.5, 1.48}, 0.000657167}, {{6.0, 0.5, 1.48},
 0.171688520}, {{6.0, 0.95, 1.48}, 
0.037318337}, {{6.0, 1.4, 1.48}, 0.020935844}, {{6.0, 1.85, 1.48},
 0.010770763}, {{6.0, 2.3, 1.48}, 
0.001978291}, {{6.0, 2.75, 1.48}, 0.001383724}, {{6.0, 3.2, 1.48},
 0.001187968}, {{6.0, 3.65, 1.48}, 
0.001118549}, {{6.0, 4.1, 1.48}, 0.001102419}, {{6.0, 4.55, 1.48},
 0.001099128}, {{6.0, 5.0, 1.48}, 0.001098510}, {{6.5, 0.5, 1.48},
 0.068587277}, {{6.5, 1.0, 1.48}, 0.046848262}, {{6.5, 1.5, 1.48},
 0.041946536}, {{6.5, 2.0, 1.48}, 0.006275392}, {{6.5, 2.5, 1.48},
 0.001426437}, {{6.5, 3.0, 1.48}, 0.000355457}, {{6.5, 3.5, 1.48},
 0.000169468}, {{6.5, 4.0, 1.48}, 0.000139882}, {{6.5, 4.5, 1.48},
 0.000137259}, {{6.5, 5.0, 1.48}, 0.000136512}, {{6.5, 5.5, 1.48},
 0.000136641}, {{7.0, 0.5, 1.48}, 
0.112742025}, {{7.0, 1.05, 1.48}, 0.049215071}, {{7.0, 1.6, 1.48},
 0.013549062}, {{7.0, 2.15, 1.48}, 
0.001826628}, {{7.0, 2.7, 1.48}, 0.000537032}, {{7.0, 3.25, 1.48},
 0.000141105}, {{7.0, 3.8, 1.48}, 
0.000038400}, {{7.0, 4.35, 1.48}, 0.000027300}, {{7.0, 4.9, 1.48},
 0.000028400}, {{7.0, 5.45, 1.48}, 
0.000026100}, {{7.0, 6.0, 1.48}, 0.000026100}, {{7.5, 0.5, 1.48}, 
0.191399751}, {{7.5, 1.1, 1.48}, 0.042342404}, {{7.5, 1.7, 1.48}, 
0.006991319}, {{7.5, 2.3, 1.48}, 0.006516285}, {{7.5, 2.9, 1.48}, 
0.000284753}, {{7.5, 3.5, 1.48}, 0.000039100}, {{7.5, 4.1, 1.48}, 
0.000006440}, {{7.5, 4.7, 1.48}, 0.000004360}, {{7.5, 5.3, 1.48}, 
0.000001930}, {{7.5, 5.9, 1.48}, 0.000001870}, {{7.5, 6.5, 1.48}, 
0.000001870}, {{8.0, 0.5, 1.48}, 0.042009734}, {{8.0, 1.15, 1.48},
 0.034969534}, {{8.0, 1.8, 1.48}, 
0.068638665}, {{8.0, 2.45, 1.48}, 0.001238419}, {{8.0, 3.1, 1.48},
 0.000505915}, {{8.0, 3.75, 1.48}, 
0.000006690}, {{8.0, 4.4, 1.48}, 0.000002110}, {{8.0, 5.05, 1.48},
 0.000001170}, {{8.0, 5.7, 1.48}, 
0.000000360}, {{8.0, 6.35, 1.48}, 0.000000351}, {{8.0, 7.0, 1.48},
 0.000000347}, {{4.0, 0.5, 1.61}, 
0.442993049}, {{4.0, 0.75, 1.61}, 0.433506362}, {{4.0, 1.0, 1.61},
 0.428023917}, {{4.0, 1.25, 1.61}, 
0.424278915}, {{4.0, 1.5, 1.61}, 0.432292916}, {{4.0, 1.75, 1.61},
 0.423051232}, {{4.0, 2.0, 1.61}, 
0.421833461}, {{4.0, 2.25, 1.61}, 0.421056046}, {{4.0, 2.5, 1.61},
 0.420698219}, {{4.0, 2.75, 1.61}, 
0.420601196}, {{4.0, 3.0, 1.61}, 0.420576087}, {{4.5, 0.5, 1.61}, 
0.079797092}, {{4.5, 0.8, 1.61}, 0.069004619}, {{4.5, 1.1, 1.61}, 
0.066212212}, {{4.5, 1.4, 1.61}, 0.063833930}, {{4.5, 1.7, 1.61}, 
0.060338827}, {{4.5, 2.0, 1.61}, 0.060037234}, {{4.5, 2.3, 1.61}, 
0.059176593}, {{4.5, 2.6, 1.61}, 0.058833063}, {{4.5, 2.9, 1.61}, 
0.060047219}, {{4.5, 3.2, 1.61}, 0.058698631}, {{4.5, 3.5, 1.61}, 
0.058689419}, {{5.0, 0.5, 1.61}, 0.036286735}, {{5.0, 0.85, 1.61},
 0.024585617}, {{5.0, 1.2, 1.61}, 
0.064207423}, {{5.0, 1.55, 1.61}, 0.023200253}, {{5.0, 1.9, 1.61},
 0.017783631}, {{5.0, 2.25, 1.61}, 
0.016861914}, {{5.0, 2.6, 1.61}, 0.016435642}, {{5.0, 2.95, 1.61},
 0.016410468}, {{5.0, 3.3, 1.61}, 
0.016269286}, {{5.0, 3.65, 1.61}, 0.016265428}, {{5.0, 4.0, 1.61},
 0.016260452}, {{5.5, 0.5, 1.61}, 0.025862558}, {{5.5, 0.9, 1.61},
 0.012959597}, {{5.5, 1.3, 1.61}, 0.011164651}, {{5.5, 1.7, 1.61},
 0.009266832}, {{5.5, 2.1, 1.61}, 0.007711323}, {{5.5, 2.5, 1.61},
 0.006852589}, {{5.5, 2.9, 1.61}, 0.006663697}, {{5.5, 3.3, 1.61},
 0.006625660}, {{5.5, 3.7, 1.61}, 0.006655079}, {{5.5, 4.1, 1.61},
 0.006605237}, {{5.5, 4.5, 1.61}, 0.006604260}, {{6.0, 0.5, 1.61},
 0.069386605}, {{6.0, 0.95, 1.61}, 
0.017644090}, {{6.0, 1.4, 1.61}, 0.005568278}, {{6.0, 1.85, 1.61},
 0.004963031}, {{6.0, 2.3, 1.61}, 
0.001892505}, {{6.0, 2.75, 1.61}, 0.001697214}, {{6.0, 3.2, 1.61},
 0.001638167}, {{6.0, 3.65, 1.61}, 
0.001621715}, {{6.0, 4.1, 1.61}, 0.001617843}, {{6.0, 4.55, 1.61},
 0.001617022}, {{6.0, 5.0, 1.61}, 0.001616871}, {{6.5, 0.5, 1.61},
 0.031140290}, {{6.5, 1.0, 1.61}, 0.010471933}, {{6.5, 1.5, 1.61},
 0.005519495}, {{6.5, 2.0, 1.61}, 0.001558053}, {{6.5, 2.5, 1.61},
 0.000485185}, {{6.5, 3.0, 1.61}, 0.000234659}, {{6.5, 3.5, 1.61},
 0.000189712}, {{6.5, 4.0, 1.61}, 0.000182987}, {{6.5, 4.5, 1.61},
 0.000182630}, {{6.5, 5.0, 1.61}, 0.000181682}, {{6.5, 5.5, 1.61},
 0.000181646}, {{7.0, 0.5, 1.61}, 
0.017778435}, {{7.0, 1.05, 1.61}, 0.011274790}, {{7.0, 1.6, 1.61},
 0.002863776}, {{7.0, 2.15, 1.61}, 
0.000487258}, {{7.0, 2.7, 1.61}, 0.000189667}, {{7.0, 3.25, 1.61},
 0.000046300}};
$\endgroup$
6
  • 1
    $\begingroup$ There's no way to get rid of Interpolation::udeg if you have an unstructured (nonrectangular) grid (which you do), other than to specify InterpolationOrder -> 1. You cannot interpolate with a higher order, if that is what you are trying to do. (One might get rid of Interpolation::femimq by reordering, if reordering affects the triangulation, which I don't know for sure, or there are near-duplicate points. -- You don't have this problem, but it appeared in the linked Community discussion.) $\endgroup$
    – Michael E2
    Nov 28 '21 at 17:32
  • $\begingroup$ @MichaelE2 Thank you for your response! If I did want to try to reorder my data how would I go about it? $\endgroup$ Nov 28 '21 at 17:35
  • 1
    $\begingroup$ Sort[data]? Or lookup SortBy if you want more control. Or do you want to reorder it in some other way? There's Reverse[data] and RandomSample[data, Length@data]. -- Frankly, I cannot imagine why you are dissatisfied with func = Interpolation[data]. "Unstructured grid" and "outside the range" are just facts. The only way I can imagine to change the facts is to change the data. Multivariate polynomial interpolation is fairly limited. There are other methods, but no built-in ones. Look up polyharmonic spline, radial basis function (RBF), on this side or the web. $\endgroup$
    – Michael E2
    Nov 28 '21 at 17:52
  • 1
    $\begingroup$ You may try Obtuse package: familydahl.se/mathematica For your example "PolyharmonicSplineInterpolation" shown by Ted seems to be a better choice though. $\endgroup$
    – xzczd
    Nov 29 '21 at 2:33
  • $\begingroup$ @MichaelE2 Thank you for your help. $\endgroup$ Nov 29 '21 at 16:20
5
$\begingroup$

A wonderful function for that is PolyharmonicSplineInterpolation.

fun=ResourceFunction["PolyharmonicSplineInterpolation"][data,Compiled->True];
fun[6.55,2.08,1.51]
(* -0.00221661 *)

The weakness is that my computer needed almost two minutes to make the interpolacan above. Now I can make the nice plot below.

Plot3D[fun[x,y,1.02],{x,4,8},{y,1,3}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much! I was trying to play around with PolyharmonicSplineInterpolation on my own and I was struggling a bit. This is very helpful. Thanks! $\endgroup$ Nov 29 '21 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.