Regression of a vector in a optimization problem
이전 댓글 표시
Hello everyone,
I need to fit experimental data to an analytical solution. The analytical solution has the form:
- C(z,t) = C_eq*f(z,t,D)
where f(z,t,D) is a known function of time (t) and position (z), and D and C_eq are parameters to regress.
I have already determined D and C_eq using the routine fminsearch. However, I would like to consider that C_eq does not necessarily have to be constant and can change over time.
My question is whether it is possible to regress C_eq as a vector instead of a constant? In this case, which routine is the most appropriate?
P.D: parameter D could also be considered as a vector if necessary.
Thanks in advance.
댓글 수: 5
Torsten
2019년 7월 31일
Do you have experimental data at different z-positions ?
Ronny Rives
2019년 7월 31일
Torsten
2019년 7월 31일
You shouldn't work with too many degrees of freedom for C_eq.
E.g. if you consider it as a function of time and position, you could choose it as
C_eq = C_experimental/f(z,t,D)
which gives a 100% fit between experimental and theoretical values.
If you consider it as a function of time and you have experimental data at times
t1 < t2 < ... < tn,
you can choose C_eq between 0 and t1 such that it fits best your data at t1, you can choose C_eq between t1 and t2 such that it fits best your data at t2 and so on.
But I think this only gives you more degrees of freedom in the fitting process, but doesn't make much sense from the physics point of view.
Ronny Rives
2019년 7월 31일
Torsten
2019년 8월 1일
Use "lsqcurvefit" with the parameter vector x = (C_eq(1),C_eq(2),...,C_eq(n)).
채택된 답변
추가 답변 (1개)
Sai Bhargav Avula
2019년 8월 13일
0 개 추천
As mentioned by Torsten, lsqcurvefit can be used to obtain a vector as a result of the regression. But those values use the entire data for getting the output values . For you particular case you should segment the data based on time stamps and perform lsqcurvefit in a for loop.
댓글 수: 1
Matt J
2019년 8월 13일
I don't think a loop would be appropriate here, actually, because as I understand it, the parameter D is shared by all time blocks.
카테고리
도움말 센터 및 File Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!