Initial values in multivariate nonlinear regression

9 Ansichten (letzte 30 Tage)
Moha Singa
Moha Singa am 25 Mai 2022
Kommentiert: Moha Singa am 27 Mai 2022
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.

Akzeptierte Antwort

Torsten
Torsten am 25 Mai 2022
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).

Weitere Antworten (0)

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by