How can I get the equation from Regression Learner App?

47 views (last 30 days)
Diego Jimenez
Diego Jimenez on 28 Jul 2020
Commented: Nilanshu Mahant on 7 May 2022 at 19:54
Hi there,
I am using the MATLAB regression learner app and have identified GP Regression Matern 5/2 as the best model. I have exported the model to Matlab and was wondering how I could obtain an equation linking my predictor variables to my response variable. I have attached a screenshot of what is found in the Regression GP workspace.
Many thanks.

Answers (1)

Ayush Gupta
Ayush Gupta on 8 Sep 2020
Edited: Ayush Gupta on 8 Sep 2020
The Gaussian Process Model is equivalent to the following:
P(y|f,X)~N(y|Hβ+f,σ^2.I) Please refer to the documentation of Gaussian Process Regression Models below:
The example code files are attached to this article.
In order to see the prediction formula, you would need to collect the parameters and plug them into the equation.
The function "predictWithEquation" in the attachment "fitrgp_equation.m" could be used to accomplish this.
The following would be the prediction formula:
ypred = HFcn(XnewStd)*betaHat + KXnewXA*alphaHat;
The function "predictWithEquation" can also be used for predicting values by feeding in new data. Please look at "fitrgp_equation" in "fitrgp_equation.m" as an example.
  2 Comments
Nilanshu Mahant
Nilanshu Mahant on 7 May 2022 at 19:54
Hello,
I have same issues with same model. I could not recognize how to get a equation from predictors?
can you please clear what you are talking about?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!