Answers.Body: <p>So this is considered <a href="https://en.wikipedia.org/wiki/Ordinal_regression" rel="nofollow noreferrer">Ordinal Regression</a>. There are many ways to model this type of data, generally in some form of regression setting. I do not recommend the softmax route because as you mentioned, there exists prebuilt correlation to the outputs.  </p>
  
  <p><em>Some common ways to approach this</em><br>
  (Note that im assuming your looking for methodologies that can be optimized through gradient techniques because of the way you formulated your question)  </p>
  
  <ol>
  <li>Treat it as a normal regressor where you clip the output to your range, and then define thresholds arbitrarily, such as <span class="math-container">$.36 \rightarrow .4$</span>, <span class="math-container">$.34 \rightarrow .3$</span>, etc..</li>
  <li>Use a bounded activation function then scale (if your outputs are [0,1,.1], you could use sigmoid and just scale by a factor of 1, but if [0,10,1], you could use sigmoid and scale by 10. Once again youll need to create arbitrary threshold between each 2 points for inference (this can also be incorporated into your loss)  </li>
  <li>Using the above two methods, but learn the threshold between each 2 ordered points. Have an output layer that learns the ideal threshold for inference  </li>
  </ol>
  
  <p>And if you didnt want to use neural netowrks, each of these approaches have a bayesian analog that work as well! </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-22T15:10:02.320Z
Answers.LastActivityDate: 2019-07-22T15:10:02.320Z
Answers.UserDisplayName: mshlis
Body: <p>Say I have some data I am trying to learn, and I'm aware that the output is quantised in some way, e.g. I can get only get discrete values (0.1, 0.2, 0.3...0.9) in a finite range.</p>
  
  <p>Would you treat that as regression or classification? In this case the numbers do have a relation to each other e.g. 0.3 is close to 0.4 in meaning.</p>
  
  <p>I could treat it as classification with a softmax final layer with N outputs, or could treat it as regression with a linear layer with single output and then somehow quantise the result post-prediction. But my gut feeling is that the fact there is a finite number of answers that that should somehow be used in my model?</p>
  
Tags: <classification><models><regression>
Title: Should I model a problem with quantised output as classification or regression?
UserDisplayName: Matt Hamilton
ThreadText: # Should I model a problem with quantised output as classification or regression?
  
  (Asked by: username_0 on 2019-07-22)
  
  Say I have some data I am trying to learn, and I'm aware that the output is quantised in some way, e.g. I can get only get discrete values (0.1, 0.2, 0.3...0.9) in a finite range.
  
  Would you treat that as regression or classification? In this case the numbers do have a relation to each other e.g. 0.3 is close to 0.4 in meaning.
  
  I could treat it as classification with a softmax final layer with N outputs, or could treat it as regression with a linear layer with single output and then somehow quantise the result post-prediction. But my gut feeling is that the fact there is a finite number of answers that that should somehow be used in my model?
  
  **Tags:** classification, models, regression
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-22. Score: 1
  
  So this is considered [Ordinal Regression](https://en.wikipedia.org/wiki/Ordinal_regression). There are many ways to model this type of data, generally in some form of regression setting. I do not recommend the softmax route because as you mentioned, there exists prebuilt correlation to the outputs.
  
  *Some common ways to approach this*  
  (Note that im assuming your looking for methodologies that can be optimized through gradient techniques because of the way you formulated your question)
  
  1. Treat it as a normal regressor where you clip the output to your range, and then define thresholds arbitrarily, such as $.36 \rightarrow .4$, $.34 \rightarrow .3$, etc..
  2. Use a bounded activation function then scale (if your outputs are [0,1,.1], you could use sigmoid and just scale by a factor of 1, but if [0,10,1], you could use sigmoid and scale by 10. Once again youll need to create arbitrary threshold between each 2 points for inference (this can also be incorporated into your loss)
  3. Using the above two methods, but learn the threshold between each 2 ordered points. Have an output layer that learns the ideal threshold for inference
  
  And if you didnt want to use neural netowrks, each of these approaches have a bayesian analog that work as well!
  
  
  ---
  
  