Problem in finding the global minima of a regression model

2 views (last 30 days)
I have created a regression model using the Matlab Regression Learner App in order to fit the best curve to a series of parameters. I succeed in creating a trainedModel (1x1 struct); however I do not really know what I have to do in order to proceed.
I have exported the model in the workspace and tried to use surrogateopt to find the global minima. The problem is that, being really new to Matlab, I cannot understand why the function does not accept the trainedModel.predictFcn as a valid function.
Could you please give me a sort of guidance I need to follow, as detailed as possible, in order to achieve my objective.
Thanks in advance.

Accepted Answer

Alan Weiss
Alan Weiss on 1 Feb 2022
If you have a trained regression model then I think that there is nothing left to minimize. The training is, in fact, the solution of the minimum, where the software minimizes the sum of squared differences between the data and the model predictions. This is the best curve you refer to.
Or perhaps I misunderstand what you are trying to do. If so, please ask again with more detail.
Alan Weiss
MATLAB mathematical toolbox documentation
Giuseppe Matera
Giuseppe Matera on 2 Feb 2022
I will definitly have a look at it.
Thanks again for all your help and time.
Best regards.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by