Optimisation Algorithm and Levenberg-Marquardt for fitglm in MATLAB

조회 수: 4 (최근 30일)
bethel o
bethel o 2023년 5월 29일
댓글: bethel o 2023년 5월 29일
I am currently working with the `fitglm` function in MATLAB for fitting Generalized Linear Models (GLMs). While using `fitglm`, I found it challenging to report the specific optimization algorithm used for fitting the model, as the documentation does not provide this information explicitly.
Therefore, I would like to ask the MATLAB community if anyone knows the optimization algorithm employed by `fitglm` when fitting GLMs. It would be helpful to understand the algorithmic details to better interpret and report the results.
Additionally, I am curious if it is possible to utilize the Levenberg-Marquardt algorithm as an alternative optimization method for fitting GLMs using `fitglm`. If anyone has insights or suggestions on how to incorporate the Levenberg-Marquardt algorithm in the context of `fitglm`, I would greatly appreciate your input.
Thank you for your assistance!

답변 (1개)

John D'Errico
John D'Errico 2023년 5월 29일
The important thing you need to recognize is that fitglm fits a LINEAR model. No nonlinear iterations will be performed.
As such, fitglm will use little more than backslash to estimate the parameters. Yes, there are some modes fitglm operates in where something special needs to be done. For example, categorical variables. But that just ends up forcing the code to create a dummy variable.
Finally, I see that fitglm allows the providion of some other distribution for the response variable than the default Normal. In any event though, Levenberg-Marquardt would not be appropriate for a non-Normal case.
Is there any reason why you would rationally want to use Levenberg-Marquardt for this? NO. Only that you think it would be interesting? Well, yes, it MIGHT be interesting to carry a pea to Boston with a Mack truck. But only if your goal was to use the completely wrong tool to solve the problem.
  댓글 수: 1
bethel o
bethel o 2023년 5월 29일
Honestly, I am happy with results I got with fitglm. Another person, without giving any reason said the Levenberg-Marquardt method would give a better result.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by