Answers.Body: <p>Since you're termed the problem you're trying to solve is to "measure the body temperature of a person", the output should be a continuous valued number.</p>
  
  <p>If the problem statement had been to rank or classify a person's body temperature as fever/healthy, then this could be a classification problem.</p>
  
  <p>Deep learning employ neuron units at the output layer depending on the target objective.</p>
  
  <p>Almost all machine learning approaches produce continuous valued predictions. The output is usually "classified" to a set of discrete labels in a separate step using cutoff values. Its best to produce a probability estimate as an outcome since the step of classifying is going to introduce additional errors due to the choice of a cutoff value.</p>
  
  <p>For example, deep learning models deployed for the ImageNet computer vision dataset to classify objects into one of 1000 objects do not give the class of the object. Instead they give a 1000 value output listing the probability of that image being in a particular class. An image of a snow leopard would generate a probability of 95% snow leopard, 90% leopard, 75% Cat, etc.</p>
  
  <p>So, to summarize, the output of your task should be a temperature reading such as 36&deg;C.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-04T10:59:58.437Z
Answers.Text: Great idea to actually output a listing of the probabilities! I might do that as well, thank you!
Answers.UserDisplayName: UsualStranger
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-04T09:03:41.727Z
Answers.LastActivityDate: 2017-11-04T09:03:41.727Z
Answers.UserDisplayName: Sandeep S. Sandhu
Answers.Body: <p>I think it depends on you application and what data you have available. </p>
  
  <p>If the prediction of body temperature itself doesn't have to be accurate and classes like COLD, NORMAL, and HOT will suffice, you should stay with a classification. There isn't a cut off but as you increase the number of classes that represent numbers on the same scale, it may become more difficult to interpret the result as there will be a distribution across the classes.</p>
  
  <p>If you choose regression on the other hand, you are not restricted by your classes anymore and may be able to tell the difference between 36.5 and 36C which (according to wikipedia) can be <a href="https://en.m.wikipedia.org/wiki/Human_body_temperature" rel="nofollow noreferrer">the difference between normal and cold</a>. This is something classes may not be able to capture. </p>
  
  <p>Another thing to consider is what your training data looks like and how accurately you want to predict the temperature. If you have pictures of people and a temperature reading, where was the reading taken and how accurate is the reading? If it isn't accurate (+- 1 degree) you may not be able to give as accurate predictions as you would like and may only be able to do 3 different classes like above. </p>
  
  <p>If you don't have a data set, then that is another problem altogether and might require another question as it depends on your application. </p>
  
  <p>I think that your problem is interesting and I hope this can help you to understand how best to apply deep learning to it. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-03T21:30:07.723Z
Answers.LastActivityDate: 2017-11-03T21:30:07.723Z
Answers.UserDisplayName: Jaden Travnik
Body: <p>I am fairly new to deep learning in general and I am currently facing a problem I want to solve using neural networks and I am unsure if it is a <em>classification</em> or <em>regression</em> problem. I am aware that classification problems are about classifying whether an input belongs to class A or class B (or class C ...) and regression problems are about mapping the input to some sort of continuous output (just like the house pricing problem).</p>
  
  <p>I basically want to measure the body temperature of a person using a simple video camera. To me, this seems like more of a <em>regression</em> type of issue rather than <em>classification</em>, because of the actual continuous result values I want the neural network to produce from the input video frames, e.g. 39°Celsius. But a question that came to my mind was: What if I use every integer value in the range from 35°C to 42°C as a possible output class? This would make it a classification problem, am I right? What would be the correct approach here and why? Classification or regression?</p>
  
Tags: <machine-learning><deep-learning><ai-design><classification><regression>
Title: Should the prediction of the body temperature given a camera image be modelled as classification or regression?
UserDisplayName: UsualStranger
ThreadText: # Should the prediction of the body temperature given a camera image be modelled as classification or regression?
  
  (Asked by: username_0 on 2017-11-03)
  
  I am fairly new to deep learning in general and I am currently facing a problem I want to solve using neural networks and I am unsure if it is a *classification* or *regression* problem. I am aware that classification problems are about classifying whether an input belongs to class A or class B (or class C ...) and regression problems are about mapping the input to some sort of continuous output (just like the house pricing problem).
  
  I basically want to measure the body temperature of a person using a simple video camera. To me, this seems like more of a *regression* type of issue rather than *classification*, because of the actual continuous result values I want the neural network to produce from the input video frames, e.g. 39°Celsius. But a question that came to my mind was: What if I use every integer value in the range from 35°C to 42°C as a possible output class? This would make it a classification problem, am I right? What would be the correct approach here and why? Classification or regression?
  
  **Tags:** machine-learning, deep-learning, ai-design, classification, regression
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-11-03. Score: 3 | Accepted answer
  
  I think it depends on you application and what data you have available.
  
  If the prediction of body temperature itself doesn't have to be accurate and classes like COLD, NORMAL, and HOT will suffice, you should stay with a classification. There isn't a cut off but as you increase the number of classes that represent numbers on the same scale, it may become more difficult to interpret the result as there will be a distribution across the classes.
  
  If you choose regression on the other hand, you are not restricted by your classes anymore and may be able to tell the difference between 36.5 and 36C which (according to wikipedia) can be [the difference between normal and cold](https://en.m.wikipedia.org/wiki/Human_body_temperature). This is something classes may not be able to capture.
  
  Another thing to consider is what your training data looks like and how accurately you want to predict the temperature. If you have pictures of people and a temperature reading, where was the reading taken and how accurate is the reading? If it isn't accurate (+- 1 degree) you may not be able to give as accurate predictions as you would like and may only be able to do 3 different classes like above.
  
  If you don't have a data set, then that is another problem altogether and might require another question as it depends on your application.
  
  I think that your problem is interesting and I hope this can help you to understand how best to apply deep learning to it.
  
  
  ---
  
  ### Answer by username_1 on 2017-11-04. Score: 2
  
  Since you're termed the problem you're trying to solve is to "measure the body temperature of a person", the output should be a continuous valued number.
  
  If the problem statement had been to rank or classify a person's body temperature as fever/healthy, then this could be a classification problem.
  
  Deep learning employ neuron units at the output layer depending on the target objective.
  
  Almost all machine learning approaches produce continuous valued predictions. The output is usually "classified" to a set of discrete labels in a separate step using cutoff values. Its best to produce a probability estimate as an outcome since the step of classifying is going to introduce additional errors due to the choice of a cutoff value.
  
  For example, deep learning models deployed for the ImageNet computer vision dataset to classify objects into one of 1000 objects do not give the class of the object. Instead they give a 1000 value output listing the probability of that image being in a particular class. An image of a snow leopard would generate a probability of 95% snow leopard, 90% leopard, 75% Cat, etc.
  
  So, to summarize, the output of your task should be a temperature reading such as 36°C.
  
  > **Comments:**
  > **username_0**: Great idea to actually output a listing of the probabilities! I might do that as well, thank you!  
  
  ---
  
  