title: How to deal with ordinal labels in keras?
body: <p>I have data with integer target class in the range 1-5 where one is the lowest and five the highest. In this case, should I consider it as regression problem and have one node in the output layer? </p>
  
  <p>My way of handling it is: </p>
  
  <p>1- first I convert the labels to binary class matrix</p>
  
  <pre><code>labels = to_categorical(np.asarray(labels))
  </code></pre>
  
  <p>2- in the output layer, I have five nodes </p>
  
  <pre><code>main_output = Dense(5, activation='sigmoid', name='main_output')(x)
  </code></pre>
  
  <p>3- I use 'categorical_crossentropy  with mean_squared_error when compiling</p>
  
  <pre><code>model.compile(optimizer='rmsprop',loss='categorical_crossentropy',metrics=['mean_squared_error'],loss_weights=[0.2])
  </code></pre>
  
  <p>Also, can anyone tells me: what is the difference between using categorical_accuracy and 'mean_squared_error in this case? </p>