Good non linear Regression
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jessica Larry
el 30 de Abr. de 2020
Comentada: Alex Sha
el 1 de Mayo de 2020
I have the following data:
x = [15, 25, 35, 45, 55, 65, 75]
y = [22.3, 27.5, 28.8, 29.9, 29.6, 27.4, 23.3]
How could I create a good regression that would fit the data above best. I'm trying to plot them both on the same graph so you can see the different between both lines.
4 comentarios
Ameer Hamza
el 1 de Mayo de 2020
Is this result also from 1stOpt? Did you specify the equation or the toolbox is also able to find a suitable equation to fit the data points automatically? I have never tried it, so I am not aware of all the features.
Alex Sha
el 1 de Mayo de 2020
If matlab, refer: https://www.mathworks.com/matlabcentral/fileexchange/32225-interface-with-eureqa-featuring-symbolic-regression
There is also a function in 1stOpt in which the best fit model function could be serached automatically according to the data user provided.
Respuesta aceptada
Ameer Hamza
el 30 de Abr. de 2020
Editada: Ameer Hamza
el 30 de Abr. de 2020
One option is to use smoothingspline option from the curve fitting toolbox
x = [15, 25, 35, 45, 55, 65, 75];
y = [22.3, 27.5, 28.8, 29.9, 29.6, 27.4, 23.3];
model = fit(x(:), y(:), 'smoothingspline');
plot(x, y, 'r+');
hold on
xv = linspace(min(x), max(x));
plot(xv, model(xv), 'b-');

You can also try this FEX package: https://www.mathworks.com/matlabcentral/fileexchange/19564-local-linear-kernel-regression
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
