RMSE, R square question calculation

4 ビュー (過去 30 日間)
sam vikum
sam vikum 2016 年 12 月 2 日
i have my confusion matrix as C.mat
8263 20 39
2 3826 14
43 7 4431
My predicted class labels are Ypred and actual labels are Ytest. Ypred size is 16000*1 and Ytest 16000*1
I am trying to calculate the R sqaure and RMSE and I defined the following:
rmse = sqrt(immse(Ypred, Ytest));
I also tried to use the built in function to generate R SQUARE between two vectors
mdl=fitlm(Ypred,Ytest,'linear')
But both didnt work. Is there something I am missing?

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by