Find optimal parameter values for model
30 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am currently modelling a heart. The current model is not ideal yet, so I need to find the optimal parameter values in order to match my wanted output. E.g. I need to model my blood pressure, which is affected by 6 parameters. The wanted output, an average over a time period, should be within the range 110-120 (mmHg). I've tried to use nested for loops of ranges, however I would like a tidier approach. Does anybody have an idea on how to approach this?
1 comentario
Sam Chak
el 28 de Mayo de 2022
So, you want to mathematically model your heart's pumping cycle: systole/diastole. If you would like to have a tidier model, then we need to see how less tidy your model is. This helps to identify the parts that need to be cleaned up.
Respuestas (1)
Saarthak Gupta
el 15 de Dic. de 2023
Hi Tycho,
As per Sam’s suggestion, it would be beneficial if you could share your current model so that contributors can assess and provide an alternate approach, as per your request.
As per the title, however, I assume you simply wish to estimate the parameters of your model. This qualifies as a typical curve-fitting or regression problem, and MATLAB offers several tools and solvers for the same. Depending on the nature of the problem and existence of constraints (bound constraints and other), you may specify the optimization algorithm or let the solver makes that choice, to achieve the best fit.
Nonlinear least-squares problems typically use one of the following algorithms: Trust Region reflective, Interior point, Levenberg Marquardt, IRLS.
Whereas linear least-squares problems use one of the following: Interior point, Trust Region reflective, Active set and QR Decomposition.
Please refer to the trailing links for a detailed explanation.
Optimization Toolbox
Optimization Toolbox offers the “lsqlin” solver for linear least-squares problems and “lsqcurvefit” and “lsqnonlin” solvers for nonlinear least-squares problems.
Curve Fitting Toolbox
In the Curve Fitting Toolbox, “fit” function with the options specified in a “fitoptions” object is the standard way to fit curves and surfaces to data.
If your model belongs to one of the several library models defined as part of the toolbox, you may choose them for faster convergence (since their starting points are optimized)
Statistics and Machine Learning Toolbox
Statistics and Machine Learning Toolbox offers solvers for Linear and Nonlinear regression. “fitlm” is used for Linear regression, and “fitnlm”, “nlinfit” are used for Nonlinear regression.
Fitting a dynamic model, however, is more involved. Please refer to the following answer for a detailed discussion with an example: https://www.mathworks.com/matlabcentral/answers/43439
Please refer to the following MATLAB documentation for further reference:
Curve Fitting Toolbox
Linear and Nonlinear Regression: https://in.mathworks.com/help/curvefit/linear-and-nonlinear-regression.html
Optimization Toolbox
Optimization Decision Table: https://in.mathworks.com/help/optim/ug/optimization-decision-table.html
Statistics and Machine Learning Toolbox
Hope this helps!
Best regards,
Saarthak
0 comentarios
Ver también
Categorías
Más información sobre Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!