How can I perform optimisation on a trained machine learning regression model in Matlab?

2 views (last 30 days)
Hello,
I have trained a Gaussian process regression model in Matlab. It is of the “struct” form trainedModel.predictFcn(x) where x is my input vector.
How can I use the function in this form for optimisation?
I essentially want to solve and find all values of the vector x for which the function equals some scalar value Y.
Thanks!
  3 Comments
Hamid Attar
Hamid Attar on 20 May 2020
Hi Asvin,
Please see the figure below. The contour is showing part of the function trainedModel.predictFcn(x). This functon has 6 dimentions, since I trained the model with 6 feature vectors, but I just kept 4 variables constant to visulise this contour for the purpose of asking this question.
I want to solve the model for all non unique solutions where the model intercepts with a hyperplane set as a constant Y (20 for example).
In 2D this can be visulised in the figure below. I want to solve the function trainedModel.predictFcn(x) for all non unique solutions of x along the intersecting boundary, depicted by the red line Y. That is, I want to solve for all non unique variable combinations, x, in the 6D space, such that the values of trainedModel.predictFcn(x) are equal to Y at all of those non unique values of x.
I intend to use this trained model in Matlab only. I would just like to locase the variable combinations of this boundary (In the full 6D space).

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!