Predicted response Value / Regression LearnerApp

1 view (last 30 days)
I did an analysis with the regression learner. Now I have a question about the predicted response values. How they are calculated and how I can get them into the workspace? I ask because, if I look in the linear model, witch I export, there is a difference between the predicted responce in the plots and the Fitted-values in the model. I use a 10 cross-vauld Cross validation.
best regards
  1 Comment
dpb on 1 Mar 2021
I've never used it, but the documentation notes:
"The validation scheme only affects the way that Regression Learner computes validation metrics. The final model is always trained using the full data set."
The difference you see will reflect the difference between the overfitting protected subset model(s) and the final model that is exported -- it's the exported result that would be the end result one would want to use for prediction.

Sign in to comment.

Answers (1)

Asvin Kumar
Asvin Kumar on 16 Mar 2021
Edited: Asvin Kumar on 16 Mar 2021
As it says in the first paragraph, what you see in the Regression Learner App is the Validated model. In your case, the validated model has been cross-validated 10-fold. The exported model however would be, what is referred to as, the Full model. The Full model is learned using the whole training dataset. The Validated model is trained on part of the dataset in order to give an estimate on how it would perform on unseen data.
If you'd like your exported model's behaviour to match the plots/results in the app, select Resubstitution Validation when creating your session. In this approach, the responses/predictions that you see will match that of the exported model since all the training data is used in this validation approach.
Also to be clear, the k-fold cross validated models do not overfit the data. In fact, cross-validation is performed to better understand how a model would perform on unseen data. The final exported model would trained on all the data available.

Community Treasure Hunt

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

Start Hunting!

Translated by