How to plot a regression model after exporting from regression learner app to workspace as function
3 次查看(过去 30 天)
显示 更早的评论
I have exported model from Regression learner app as function
function [trainedModel, validationRMSE] = trainRegressionModel(trainingData)
I trained new data and stored trained model and validationRMSE in variables 'a' and 'b' respectively.
Now I want to plot the actual values , predicted values and confidence interval of that model.
the varible 'a' is struct, could you please guide how can I plot the respose after exporting regression model as a funciton in workspace.
Thanks in advance.
0 个评论
回答(1 个)
Drew
2023-2-7
The answer at https://www.mathworks.com/matlabcentral/answers/1881227-question-on-regression-learner-app shows how to create predicted vs actual plots using a model exported from the Regression Learner app. You can do similarly with the model you have trained using the generate function from the Regression Learner app.
As for confidence intervals, that depends on the type of Regression Model that you have built. For Linear Models (class = LinearModel), there are many object functions for visualization, including some that show confidence intervals. See documentation https://www.mathworks.com/help/stats/linearmodel.html#bsz4dm2-5
If this answer is helpful to you, please accept this answer. If you have another more specific question about confidence intervals for a particular type of model, you might want to make that a different question.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!