Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

4D surface fitting

643 views
Skip to first unread message

sanem

unread,
May 5, 2011, 4:46:05 AM5/5/11
to
Hello,

I am using surface fitting tool in Matlab R2010b.
I can use surface fitting tool for 3D data like x and y input and z output. Now I want to use it for 4D data like x,y and z input and t output. Can I achieve this with sftool or any other tool?

Will appreciate any help on this.

Alexander

unread,
May 5, 2011, 8:32:05 AM5/5/11
to
Hi,

you can try using other multivariant search methods. A quite easy and straight forward one is the simplex search implemented in matlab using the funtion "fminsearch". However this method is quite slow. Note also that this method, like most nonlinear search algorithms, is prone to only find local minima to the problem.
An easy way to compensate for this and make the algorithm a "global search" is to use for example multiple starting points and run the analysis a couple (say 500) of times. However there are also more sophisticated multivariant search algorithms that work with other techniques available. This is just the easiest way to do it :)

Steven_Lord

unread,
May 5, 2011, 10:36:38 AM5/5/11
to

"sanem " <sanema...@gmail.com> wrote in message
news:ipto4d$l6a$1...@fred.mathworks.com...


> Hello,
>
> I am using surface fitting tool in Matlab R2010b.
> I can use surface fitting tool for 3D data like x and y input and z
> output. Now I want to use it for 4D data like x,y and z input and t
> output. Can I achieve this with sftool or any other tool?

There is no GUI interface for this (how would you draw a 4D surface on a 2D
monitor?) but you can use the tools described in the Curve Fitting Guide,
like LSQCURVEFIT from Optimization Toolbox, to fit your surface.

http://www.mathworks.com/support/tech-notes/1500/1508.html

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Richard_Willey

unread,
May 5, 2011, 1:48:45 PM5/5/11
to
Hi Sanem

I can point you at a variety of different algorithms for 4d curve fitting.
The correct choice of methods will depend on what information you have
available regarding the relationship between your variables.

1. If you know that there is a linear relationship between your variables,
your best option is to use the "regress" command in Statistics Toolbox.
2. If you know that the relationship between your variables is best
described using a known nonlinear relationship then you should look at
"nlinfit".
3. If you can't specify a model that describes the relationship between your
variables your best option is to use a boosted or a bagged decision tree.

I attached a very simple example showing how to use regress to fit a plane
to a set of data points.

X = 10 * rand(100,1);
Y = 10 * randn(100,1);
Z = 10 * randn(100,1);
t = 50 + 2*X + 3*Y + 4*Z;
b = regress(t, [ones(length(t),1), X, Y, Z])

sanem

unread,
May 11, 2011, 8:13:02 AM5/11/11
to
Hi Richard,

First of all thank you s&#305; much for your reply.

There is no relationship between my variables.
I have

X = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
Y = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
Z = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};

Here X, Y and Z represents the number of threads
and my T value is a performance metric in seconds.
T is a three dimensional array that keeps the performance values of different thread combinations.

Here, with %10 percent training data I try to predict the performance values of all combinations.

In such a case which method do you prefer?

Thanks.
Sanem


"Richard_Willey" <rwi...@mathworks.com> wrote in message <ipunuf$c4d$1...@newscl01ah.mathworks.com>...

Torsten

unread,
May 11, 2011, 9:16:09 AM5/11/11
to
On 11 Mai, 14:13, "sanem " <sanemarsla...@gmail.com> wrote:
> Hi Richard,
>
> First of all thank you s&#305; much for your reply.
>
> There is no relationship between my variables.
> I have
>
>  X = {1,  2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
>  Y = {1,  2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
>  Z = {1,  2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
>
> Here X, Y and Z represents the number of threads
> and my T value is a performance metric in seconds.
> T is a three dimensional array that keeps the performance values of different thread combinations.
>
> Here, with %10 percent training data I try to predict the performance values of all combinations.
>
> In such a case which method do you prefer?
>
> Thanks.
> Sanem
>
>
>
> "Richard_Willey" <rwil...@mathworks.com> wrote in message <ipunuf$c4...@newscl01ah.mathworks.com>...

> > Hi Sanem
>
> > I can point you at a variety of different algorithms for 4d curve fitting.
> > The correct choice of methods will depend on what information you have
> > available regarding the relationship between your variables.
>
> > 1. If you know that there is a linear relationship between your variables,
> > your best option is to use the "regress" command in Statistics Toolbox.
> > 2. If you know that the relationship between your variables is best
> > described using a known nonlinear relationship then you should look at
> > "nlinfit".
> > 3. If you can't specify a model that describes the relationship between your
> > variables your best option is to use a boosted or a bagged decision tree.
>
> > I attached a very simple example showing how to use regress to fit a plane
> > to a set of data points.
>
> > X = 10 * rand(100,1);
> > Y = 10 * randn(100,1);
> > Z = 10 * randn(100,1);
> > t = 50 + 2*X + 3*Y + 4*Z;
> > b = regress(t, [ones(length(t),1), X, Y, Z])- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

I prefer
http://www.mathworks.com/products/neuralnet/

Best wishes
Torsten.

0 new messages