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

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

a. Optimization on or Optimization using? What are you trying to optimize?
b. Where do you intend to use this trained model?
c. You mentioned, finding all values of x for which rainedModel.predictFcn(x) == y. What's your search space?
These details could help anyone answer this question better.
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).
I'm going to let someone else from the community take this. This is a bit out of my field.

Sign in to comment.

Answers (0)

Categories

Asked:

on 18 May 2020

Commented:

on 26 May 2020

Community Treasure Hunt

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

Start Hunting!