Plot: Predicted vs Actual Response and Residuals vs Predictors?

조회 수: 11 (최근 30일)
wesleynotwise
wesleynotwise 2017년 5월 26일
답변: abdallah alsayed 2019년 12월 17일
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
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.
wesleynotwise
wesleynotwise 2017년 5월 30일
Yeah. Sadly, there isn't any inbuilt functions. I do it manually though, i.e. write the equation and calculate the estimated values, then find the residuals, and make the plots.

댓글을 달려면 로그인하십시오.

답변 (1개)

abdallah alsayed
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

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by