mvregress - Warning: Maximum iterations completed
Show older comments
Hi guys,
I’m using mvregress and encountered this error message:
[Warning: Maximum iterations completed. Convergence criterion not satisfied.]
[In mvregress (line 490)]
The odd part is that I only get this message when using R2016a, but not when using R2014b.
Any ideas why?
Answers (1)
Aditya
on 31 Jan 2025
Hi Roni ,
I understand that you are facing issues with 'mvregress' function.
The error message you're encountering indicates that the mvregress function in MATLAB did not converge to a solution within the maximum number of iterations allowed.
To troubleshoot and potentially resolve the issue, you can try the following:
- Increase Maximum Iterations: Use the 'Options' parameter to increase the maximum number of iterations. For example:
options = statset('MaxIter', 1000); % Increase from the default
[beta, Sigma, E] = mvregress(X, Y, 'Options', options);
- Adjust Tolerance: Adjust the convergence tolerance settings to see if this helps the algorithm converge.
- Check Data: Ensure that your data is well-conditioned for regression. Sometimes scaling or standardizing your data can help with convergence issues.
- Compare Outputs: If possible, compare intermediate outputs from both versions to see where they start to diverge. This might give you clues about what's causing the issue.
I hope this helps you resolve your issue.
Categories
Find more on Multivariate Linear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!