Skip to main content
corrected grammar and spelling; modified formatting and title; added clarity
Source Link

Calculating RMSE AND R square fom-squared from the confusion matrix

iI 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 160001 and Ytest 160001.

I am trying to calculate the R sqaureR-squared and RMSERMSE. Is thereathere a way to directly calculate RMSERMSE and R squaredR-squared from the confusion matrix?

I tried this:

rmseRMSE = sqrt(immse(Ypred, Ytest)); but it didnt work.

However, it didn't work.

I can use R either R or matlab AnyMatlab.

Any advice will be appreciated!

Calculating RMSE AND R square fom confusion matrix

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 160001 and Ytest 160001

I am trying to calculate the R sqaure and RMSE. Is therea way to directly calculate RMSE and R squared from confusion matrix?

I tried this

rmse = sqrt(immse(Ypred, Ytest)); but it didnt work.

I use R or matlab Any advice will be appreciated!

Calculating RMSE AND R-squared from the confusion matrix

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 160001 and Ytest 160001.

I am trying to calculate the R-squared and RMSE. Is there a way to directly calculate RMSE and R-squared from the confusion matrix?

I tried this:

RMSE = sqrt(immse(Ypred, Ytest))

However, it didn't work.

I can use either R or Matlab.

Any advice will be appreciated!

Source Link
sam venu
  • 31
  • 1
  • 1
  • 2

Calculating RMSE AND R square fom confusion matrix

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 160001 and Ytest 160001

I am trying to calculate the R sqaure and RMSE. Is therea way to directly calculate RMSE and R squared from confusion matrix?

I tried this

rmse = sqrt(immse(Ypred, Ytest)); but it didnt work.

I use R or matlab Any advice will be appreciated!