title: How can I apply Normalized mean Absolute for my model accuracy in movie ratings recommendation system::
body: <p>Hello it will be very helpful if some one can help me out with NMAE (Normalized mean average Error to find the accuracy of the model:<br>
  NMAE=∑(|predicted rating – real rating|) / n(max rate – min rate)
  I have given an example how my model is giving the data set output:
  I have been using R programming for building a recommendation model for movies :</p>
  
  <pre><code>Movie Code  Votes  Real rate  Predicted Rate
  1   1371    2.5 2
  1   2193    2   3
  1   2294    2   3
  2   39  5   3
  2   50  4   3
  2   110 4   4
  2   144 3   3
  2   153 4   3
  2   208 3   3
  2   296 4   4
  2   372 3   3
  2   377 3   3
  2   474 2   3
  2   500 4   4
  2   508 4   3
  2   515 4   3
  2   539 3   3
  </code></pre>
  
  <p><strong>Data.</strong>  </p>
  
  <pre><code>movies &lt;-
  structure(list(`Movie Code` = c(1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 
  2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), Votes = c(1371L, 2193L, 
  2294L, 39L, 50L, 110L, 144L, 153L, 208L, 296L, 372L, 377L, 474L, 
  500L, 508L, 515L, 539L), `Real rate` = c(2.5, 2, 2, 5, 4, 4, 
  3, 4, 3, 4, 3, 3, 2, 4, 4, 4, 3), `Predicted Rate` = c(2L, 3L, 
  3L, 3L, 3L, 4L, 3L, 3L, 3L, 4L, 3L, 3L, 3L, 4L, 3L, 3L, 3L)), class = "data.frame", row.names = c(NA, 
  -17L))
  </code></pre>