title: How to produce a classification table of predicted vs actual values
body: <p>I'm new to R and neutral network and haven't been able to figure out how predict variable from trained network (neural network) and produce classification table of predicted vs actual values. I just haven't been able to understand the code meaning of classification table vs actual . I would greatly appreciate it if you explain the code. This is what I have done so far:</p>
  
  <pre><code>model_Wine &lt;- train(wine~., wine_df, method='nnet', trace=FALSE)
  prediction &lt;- predict(model_Wine, wine_df)
  table(prediction, wine_df$wine)
  
  prediction  A  B  C
           A 59  0  0
           B  0 71  0
           C  0  0 48
  </code></pre>
  
  <p>how do i produce classification table of predicted vs actual "wine" values?
  Thank you!</p>