Initial values in multivariate nonlinear regression

9 ビュー (過去 30 日間)
Moha Singa
Moha Singa 2022 年 5 月 25 日
コメント済み: Moha Singa 2022 年 5 月 27 日
I need to do a multivariate nonlinear regression.The regression would be quadratic with three variables (x1, x2, x3) and looks like the following:
y = a0 + a1x1 + a2x1^2 + a3x2 + a4x2^2 + a5x3 + a6x3^2 + a7x1x2 + a8x1x3 + a9x2x3 + a10x1x2x3
As shown above, the model has 11 coefficients to be estimated.If I am correct, the code should look as following:
load mydata
tbl = table(x1,x2,x3,y);
modelfun = @(b,x)b(1) + b(2)*x(:,1) + b(3)*x(:,1)^2 + b(4)*x(:,2) + b(5)*x(:,2)^2 + b(6)*x(:,3) + b(7)*x(:,3)^2 +...
b(8)*x(:,1)*x(:,2) + b(9)*x(:,1)*x(:,3) + b(10)*x(:,2)*x(:,3) + b(11)*x(:,1)*x(:,2)*x(:,3)
beta0 = [b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11];
mdl = fitnlm(tbl,modelfun,beta0)
My question is how to find good starting guess initial values for beta0. I do not want to use random initial values for the coefficients since that might not lead to a solution. I searched Matlab questions/answers and found that I could use functions such as patternsearch (link) or ga (link), but this would require having the Global Optimization Toolbox. Unfortunatelly, I do not have this toolbox.

採用された回答

Torsten
Torsten 2022 年 5 月 25 日
Your model equation
y = a0 + a1x1 + a2x1^2 + a3x2 + a4x2^2 + a5x3 + a6x3^2 + a7x1x2 + a8x1x3 + a9x2x3 + a10x1x2x3
is linear in the model parameters a0, a1,...,a10.
Thus no good starting values will be necessary. Each optimizer will reach the optimal parameters in one step (independent of the starting values).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by