フィルターのクリア

Predicting behavior of unknown functions based on known functions

4 ビュー (過去 30 日間)
Alexander Engman
Alexander Engman 2018 年 3 月 22 日
コメント済み: Alexander Engman 2018 年 3 月 22 日
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 件のコメント
Alexander Engman
Alexander Engman 2018 年 3 月 22 日
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 2018 年 3 月 22 日
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.

サインインしてコメントする。

採用された回答

John D'Errico
John D'Errico 2018 年 3 月 22 日
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.
  1 件のコメント
Alexander Engman
Alexander Engman 2018 年 3 月 22 日
Thank you very much John! This was very helpful!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLeast Squares についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by