
Hi everyone,
I tried to write the code of computing R2 for a regression system but I failed.
This is the code I use for computing RMSE:
 
my_svm_model <- function(myformula, mydata, mytestdata) 
      {
      mymodel <- svm(myformula, data=mydata)       
      mytest <- predict(mymodel, mytestdata)
      error <- mytest - mytestdata[,1]
      -sqrt(mean(error**2))
 
      }
can anyone please tell me what I have to change to compute R2 instead of RMSE?
 
Many thanks,
Nancy 		 	   		  
_________________________________________________________________


	[[alternative HTML version deleted]]


