Answers.Body: <p>I'm not quite sure what you mean in your post however I will try and address some of the points you made. Firstly, I would suggest you to go over some supervised machine learning fundamentals (there are lots of resources online).</p>
  
  <p>The general optimisation approach is to find the parameters of a model that minimise the error in your training set (using the ground truth labels). The model may not be complex enough to achieve absolutely zero error on all the training samples, and if it did it would likely generalise poorly to new data. We don't want a model to "memorise" the labels, for example, picking up contextual cues in a training image that are not relevant to the label (such as the background of the picture of a car).</p>
  
  <p>An ML model aims to reduce the error over all the samples and this is why the correct classification of a specific input can change as the model learns.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-18T16:09:12.683Z
Answers.LastActivityDate: 2018-12-18T16:09:12.683Z
Answers.UserDisplayName: Roy
Answers.Body: <p>During the training process, the machine learning program is shown example inputs (in this case pictures of digits) and also <em>what the answer should be for that input</em>. That is how it learns the correct answer.
  However, it does not learn an exact mapping between the input data and required output, instead it learns a series of patterns that generally map the input to the required value. The advantage of this approach is that it can perform the same mapping on new inputs that were not included in the training data but are similar (but not necessarily identical) to examples that it has already seen. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-16T13:05:59.367Z
Answers.Text: But if it knows what answer should be in a specific input, then why it changes a right answer to a wrong sometimes?
Answers.UserDisplayName: Gergő Horváth
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-16T15:42:04.543Z
Answers.Text: Are you asking why it sometimes gives an incorrect answer? That is because it has not learned perfectly. In the case of the MNIST dataset a few of the input images are also a bit ambiguous even for humans. Note also that these programs are tested on inputs that were NOT included in the training data, to check that they have learned to generalise properly.
Answers.UserDisplayName: DrMcCleod
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-16T15:48:12.690Z
Answers.Text: I don't understand the mechanism of it. If the program knows the right answer, how can we talk about learning? What do you mean by "not learned perfectly"?
Answers.UserDisplayName: Gergő Horváth
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-16T19:02:30.903Z
Answers.Text: OK, it sounds like a introduction to the basics of Machine Learning would be valuable for you. I recommend the following course: https://www.coursera.org/learn/machine-learning which should give you an idea how these programs work.
Answers.UserDisplayName: DrMcCleod
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-16T12:56:40.157Z
Answers.LastActivityDate: 2018-12-20T19:41:49.517Z
Answers.LastEditDate: 2018-12-20T19:41:49.517Z
Answers.UserDisplayName: DrMcCleod
Body: <p>I'm completely new at ML, but really interested. To be honest, read many articles about it, but still don't understand the workings of it.</p>
  
  <p>I just started to understand this example: <a href="https://storage.googleapis.com/tfjs-examples/mnist/dist/index.html" rel="nofollow noreferrer">https://storage.googleapis.com/tfjs-examples/mnist/dist/index.html</a></p>
  
  <p>My thinking about it is that TF has some resources, some examples of how numbers look like, and try to match them with the ones in the test. I saw that sometimes the test changes a right prediction to a wrong, but makes better and better predictions. But how? I think that the program doesn't know the right predictions (and this way it won't know the wrong ones). In the training how it makes better predictions? Test by test, from what exceptions it will change it's predictions? What happens in a new test?</p>
  
Tags: <neural-networks><machine-learning><tensorflow>
Title: How TensorFlow will know if the prediction is true or false?
UserDisplayName: Gergő Horváth
ThreadText: # How TensorFlow will know if the prediction is true or false?
  
  (Asked by: username_0 on 2018-12-15)
  
  I'm completely new at ML, but really interested. To be honest, read many articles about it, but still don't understand the workings of it.
  
  I just started to understand this example: <https://storage.googleapis.com/tfjs-examples/mnist/dist/index.html>
  
  My thinking about it is that TF has some resources, some examples of how numbers look like, and try to match them with the ones in the test. I saw that sometimes the test changes a right prediction to a wrong, but makes better and better predictions. But how? I think that the program doesn't know the right predictions (and this way it won't know the wrong ones). In the training how it makes better predictions? Test by test, from what exceptions it will change it's predictions? What happens in a new test?
  
  **Tags:** neural-networks, machine-learning, tensorflow
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-12-18. Score: 1
  
  I'm not quite sure what you mean in your post however I will try and address some of the points you made. Firstly, I would suggest you to go over some supervised machine learning fundamentals (there are lots of resources online).
  
  The general optimisation approach is to find the parameters of a model that minimise the error in your training set (using the ground truth labels). The model may not be complex enough to achieve absolutely zero error on all the training samples, and if it did it would likely generalise poorly to new data. We don't want a model to "memorise" the labels, for example, picking up contextual cues in a training image that are not relevant to the label (such as the background of the picture of a car).
  
  An ML model aims to reduce the error over all the samples and this is why the correct classification of a specific input can change as the model learns.
  
  
  ---
  
  ### Answer by username_2 on 2018-12-16. Score: 1
  
  During the training process, the machine learning program is shown example inputs (in this case pictures of digits) and also *what the answer should be for that input*. That is how it learns the correct answer.
  However, it does not learn an exact mapping between the input data and required output, instead it learns a series of patterns that generally map the input to the required value. The advantage of this approach is that it can perform the same mapping on new inputs that were not included in the training data but are similar (but not necessarily identical) to examples that it has already seen.
  
  > **Comments:**
  > **username_0**: But if it knows what answer should be in a specific input, then why it changes a right answer to a wrong sometimes?  
  > **username_2**: Are you asking why it sometimes gives an incorrect answer? That is because it has not learned perfectly. In the case of the MNIST dataset a few of the input images are also a bit ambiguous even for humans. Note also that these programs are tested on inputs that were NOT included in the training data, to check that they have learned to generalise properly.  
  > **username_0**: I don't understand the mechanism of it. If the program knows the right answer, how can we talk about learning? What do you mean by "not learned perfectly"?  
  > **username_2**: OK, it sounds like a introduction to the basics of Machine Learning would be valuable for you. I recommend the following course: https://www.coursera.org/learn/machine-learning which should give you an idea how these programs work.  
  
  ---
  
  