title: Prediction on Neural Network in R
body: <p>I want to get the accuracy or the <code>RMSE</code> of the Prediction result of a neural network. I started using a Confusion Matrix, but as indicated by previous answers, the Confusion Matrix gives valid results for non Continuous variables. </p>
  
  <p>Is there any way I can get the accuracy or the error rate of a Neural Network Prediction??</p>
  
  <p>As an example here is the code I've got until now: </p>
  
  <pre><code>library(nnet)
  library(caret)
  library(e1071)
  data(rock)
  newformula &lt;- perm ~ area + peri + shape
  y &lt;- rock[, "perm"]
  x &lt;- rock[!colnames(rock)%in% "perm"]
  original &lt;- datacol(rock,"perm")
  
  nnclas_model &lt;- nnet(newformula, data = rock, size = 4, decay = 0.0001, maxit = 500)    
  nnclas_prediction &lt;- predict(nnclas_model, x)
  nnclas_tab &lt;- table(nnclas_prediction, y)
  rmse &lt;- sqrt(mean((original - nnclas_prediction)^2))
  </code></pre>
  
  <p>Does anyone know how can I make this work? or how can I get the Accuracy or the of the Neural Network Prediction? 
  Any help will be deeply appreciated.</p>