Predicting behavior of unknown functions based on known functions

5 visualizaciones (últimos 30 días)
Hi!
Lets say I have data that I have used to fit two functions:
y1=a*x^b+c %for K=10
y2=d*x^e+f %for K=20
y1 is fitted to data for a constant K=10 and y2 is fitted to data for a constant K=20. Plotting this would give me two different curves but similar in appearance.
Is there any way of predicting what the function would be for any arbitrary number K between and 10 and 20? Lets say I wanted to find or predict the function of the curve with K=15. How would I do this?
This is a similar problem to people who have data for some process that is taking place at different temperatures, and they want to predict the behavior of another temperature for which they do not have data.
Many thanks in advance.
Alexander
  3 comentarios
Alexander Engman
Alexander Engman el 22 de Mzo. de 2018
Hi,
K is not explicitly used as a value in the function. Imagine that K are temperatures for which I have collections of data. For example, diffusion of molecules into a liquid over time where time is x-data and number of molecules is y-data. If I run the experiment at different temperatures K, I will get different results and different functions. Now I want to find the function at a temperature K that I do not have data for, so I want to predict it.
I hope that it is clear. Thank you.
KSSV
KSSV el 22 de Mzo. de 2018
What I understand is you have a model, you will generate data for few instances/ cases. With this data, you want a model for cases. You want to a generalized fitting curve/ wieghts.

Iniciar sesión para comentar.

Respuesta aceptada

John D'Errico
John D'Errico el 22 de Mzo. de 2018
The process you want is called "interpolation". Effectively, you wish to infer values of two "things", given their values at known points for some parameter. Here the parameter is K.
You really have not given us sufficient information to solve the problem though.
Given only two pieces of information, at best you can only do something simple, like linear interpolation. For example, we might write this:
yK = (a*x^b+c) * (2 - K/10) + (d*x^e+f) * (K/10 - 1)
So, when we have K==10, the function reduces to y1. When K==20, the function reduces to y2. When K==15, we have yk become the average of the two functions. The form I wrote it in could be called a convex linear combination, but it is really just linear interpolation.
A problem may arise if the behavior you need to interpolate is more complex. But given only two points, thus two values for K, more sophistication is not possible, at least not without more information from you. Yes, you could use some variety of exponential or logarithmic interpolation in K. But only you know what the correct relationship might be there.
Now, had you more values for K? So perhaps you generated various relations for each of 5, 10 or 20 values for K? Then I would suggest use of a spline model, a spline interpolant. For any value of x and K, you could compute all the possible functions. Then use a tool like interp1 to infer the value at any intermediate K.
Alternatively, if all of your functions are the same identical form, thus we have coefficients a(n), b(n), c(n), where
y(n) = a(n)*x^b(n)+c(n)
So now you might decide to use interpolation on the coefficients in that family of models. Use interp1 again to predict intermediate values for the coefficients as a function of K. Or for two points, just use the same form I used before.
aK = a(1) * (2 - K/10) + a(2) * (K/10 - 1)
bK = b(1) * (2 - K/10) + b(2) * (K/10 - 1)
cK = c(1) * (2 - K/10) + c(2) * (K/10 - 1)
Then predict yK as
yK = aK*x^bK+cK
This will result in a different interpolation of course. And again, only you know which might be better.

Más respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by