Scientific user, I need your help. How should I approach finding the best fitting model for this data...

Scientific user, I need your help. How should I approach finding the best fitting model for this data? I have a bunch of points forming a surface, and I need to find some function to describe it.

Other urls found in this thread:

reference.wolfram.com/language/ref/Interpolation.html
reference.wolfram.com/language/ref/InterpolatingPolynomial.html
pastebin.com/CbeA2Wr1
pastebin.com/FaFkPXDt
pastebin.com/ZgJnBYk3
my.mixtape.moe/tzcfub.nb
twitter.com/NSFWRedditGif

Interpolation.

reference.wolfram.com/language/ref/Interpolation.html

f = {{#1,#2},#3}&@@@data // Interpolation

Where did the points come from?

Experimental data.
Thanks. I've been messing around with NonLinearModelFit, but I guess I can try interpolating. I still don't understand how to retrieve the symbolic representation of the interpolating function though.

Is it stochastic data?

No.

Bump

What id your theorical model? Also, resttict yourself to curves proyected into different planes.

Curiosity bump

>I still don't understand how to retrieve the symbolic representation
reference.wolfram.com/language/ref/InterpolatingPolynomial.html

Matlab surely have fitting functions.
Im using python, scipy module have lots of shit to do this different ways.

If you need to do this a couple of times, id consider learning one of the above, or something else.

Mathematica is fine for this.

Fair warning though for this many points an interpolating polynomial will be very large. I'd have to know more about your use-case to recommend something better though. What are you trying to do with this model?

Whatever floats your boat. Its just, you eventually need to pick your weapon if you do this a lot.

This. Is there a point in having a shit looking equation like that in a paper at all?

If you just need to get a value for yourself, where you dont have samples, just inter/extrapolate it (on a mesh for example).

I honestly didn't think that my thread would last for so long.
Thanks. I think I need to show a more abstract solution, comment on the complexity of it, and offer a more simplistic one. I know exactly how to do the simplistic version, I just needed some justification for it.
There is a certain point to it. And yeah, I can get all the values I need, but I need some kind of a model that a third party can use to do the same task, and they have to be able to do it relatively easy.

Anyway, it doesn't really work, unless I'm somehow doing it wrong. At least I know that it's a 14 degree polinomial.

Forgot the pic.

Put the data in a pastebin.

pastebin.com/CbeA2Wr1
pastebin.com/FaFkPXDt

Cant get anything out of this, i give up.

It would be easier to not fit 3d but 2d, on every line (fit one for x=-70 f1(y,z), another for x=-60 f2(y,z)....). Then if you want a value, get the closest 2 fitted curve and get interpolate it.

Yeah this isn't going to work if it's on an unstructured grid like that. I'll keep playing with it and see if I can come up with something.

just believe in yourself

He should use gnu octave. If you, op, don't have access to matlab. Unless you wanna torrent it

kek

Works .0001 percent of the time, all the time

What specifically should he do with this data in Octave?

I fiddled with the data a little and ended up with this:
The color bar and the colored big points show the error between the actual and fitted data.

Use it to kill himself

Could you be a little more specific about what you intend to do? The type of data considered is pretty important for the type of fit, what are you trying to fit? Right now your data look like sweet fuck all... Representing them as a 2d plot with isocontour may give you more insight than this 3d plot about what function should be used for the fit.

Made a better pics, ill clean up the code and post it soon.

pastebin.com/ZgJnBYk3

Note that the equation printed out only works if you scale the xy values with the source data you provided to 0-1 range and scale the results back.

Thank you, user, I really appreciate your help . I guess I should learn Python, it looks like I'll have to face similar problems in the near future.

test to see if i'm banned

Very nice. Here's the Mathematica version.

Veeky Forums.org/banned

Oops did the order too high.

Anyway here's the notebook:
my.mixtape.moe/tzcfub.nb

Your welcome.
Programming is useful everywhere. If you are not into it, you are better off with a dedicated scientific toolbox, like mathematica or something.

Way simpler and more time efficient.
If i were OP (and didnt need programming for anything else) id pick mathematica.
For me nothing worked when i used the original data. After offsetting to zero and scaling to 0-1 range, the third order was the best looking fit.

I'd also recommend picking up a more conventional language in addition to getting good with Mathematica for the simple reason that you might not always have access to it since it is a paid proprietary language with no open source alternatives like Octave for Matlab. When you do have it though, it's quite a godsend for most tasks.

is it supposed to be a polynomial and not some exponential

That is a polynomial.

I mean why does the user choose a second degree polynomial to fit it and not terms like a^(bx) + b^(dy)? Is that an arbitrary choice?

Yeah I guess so. Here I added a sin(x) and sin(y) term which gives the surface a wavy characteristic.

I think polynomials are just kind of regarded as the standard use for least squares.

Probably since under the assumption that your data comes from a smooth function, you KNOW there's some nth-degree polynomial that fits it arbitrarily well (Taylor series).

So this is what data >scientists do?
Damn, at one point I was thinking about getting into it. Good that I didn't, looks like job for monkeys.

>Zero mention of probability
No this is what engineers do.

>interpretation and analysis of data is a job for monkeys
nah