Plot: Predicted vs Actual Response and Residuals vs Predictors?
23 ビュー (過去 30 日間)
古いコメントを表示
I have a regression model, and I would like to create two plots to examine its validity.
The first plot is predicted vs actual response plot. I've seen it in the Regression learner apps but not able to see the function used.
The second plot is residuals (predicted - actual response) vs predictor plot. I know one can use the 'plotResiduals (model)' function but the output is residuals vs. predicted values.
Any good suggestions?
2 件のコメント
Abel Babu
2017 年 5 月 30 日
Both Predicted Vs Actual Response Plot and Residual vs predictor Plot can be easily plotted by the scatter functions. I don't think there are inbuilt functions to directly get them.
My best guess would be that RegressionLearner app calls the normal code that you would use to plot rather than a specific function call.
回答 (1 件)
abdallah alsayed
2019 年 12 月 17 日
for i=1:100 %100 is number of sample in x and y
plot([i i],[x(i) y(i)],'color',[0,0,0]+0.5);
hold on
plot(x,'o')
plot(y,'*')
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!