Multi-parametric fit with matlab
19 views (last 30 days)
Show older comments
Hi everyone! My question is as follows:
I have several experimental data, X. X is dependent of 4 different independent variables; X=f(A,B,C,D), which are experimental data too. What I want is the expression of the multi-parametric fit; which I have to “guess” with my data. For example, in the end, I could write X like
X=A*log(B)^C+D/2, or
X=A^3/B+C*exp(D), or X=B*D…that is what I want to know.
How can I fit them? For example, if I had only X and A, maybe the relation would be like X=A^3 (easily to do with cftool). But what I want to get is a multi-parametric fit.
Is that possible to be done? Is there any toolbox that may help me? I thought about a procedure, but it’s pretty biased. For example, to hit the mark we can use dimensional analysis, but it has some limitations. Also, we can do: X=(A^a)*(B^b)*(C^c)*(D^d)
and fitting with experimental data, finding the coefficients a,b,c,d that minimize the error (an iterative process where we can use nlinfit with its least-squares, or Nelder–Mead Method). But, as you see, limitations are huge. What I want to know is if there is a toolbox that links the behave of the variables, trying and iterating with different function s to reach the best expression for X with its four variables.
I think I am asking too much, and maybe there’s no toolbox that does exactly that…but if there’s any m file you know that would help me to get the most out of calculating whit matlab in this situation (as nlinfit does) I would be very pleased.
Any ideas are welcome. Thanks in advance.
2 Comments
Greg Heath
on 4 Apr 2012
Obvious first steps:
Stare at the four plots of X vs each input and the five by five linear correlation matrix.
Consider power and log transformations and repeat.
Hope this helps.
Greg
Accepted Answer
Richard Willey
on 5 Apr 2012
Hi Miguel
fitensemble is able to handle multiple independent variables. You should be able to use this with the data set that you described.
From my perspective, the easiest way to explain nonparametric fitting to a relatively non technical audience is to describe localized regression. You can use this technique to illustrate the basic concepts. You won't be able to use localized regression to solve your problem (the algorithm doesn't scale well with large numbers of independent variables, but the basic intuition remains the same)
I have some good slides that describe how a combination of localized regression, cross validation, and bootstrap. Drop me an email at rwilley@mathworks.com and I'll fire these off to you.
0 Comments
More Answers (1)
Richard Willey
on 4 Apr 2012
Hi Miguel
From the sounds of things, your central problem is that you're unable to specify an equation that describes the relationship between your variables.
My recommendation would be to use a non-parametric fitting techniques. With a continuous response variable you could use the boosted / bagged decision trees in Statistics Toolbox. Alternatively, if you prefer you can also use a Neural network to solve the same problem. The following url will take you tot he documentation for "fitensemble"
In some cases, you might prefer to use a semi-parametric modeling technique. Assume that you can't specify an equation that describes the relationship between your variables, however, you still have some idea what's going on (Perhaps you know that the first derivative of your curve is positive. Alternatively, you know that there is an inflection point located at the following location). In this case, you're probably better off using John D'Errico's Shape Language Modelling code:
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!