Answers.Body: <blockquote>
  <p>This means that, at the end of the output layer, we must have the actual values of the target function anyway.</p>
  </blockquote>
  <p>Yes, this is necessary for supervised learning. You will often see this called a <em>labelled</em> dataset, where the &quot;label&quot; is an output value that you know is associated with each input. A set of labels associated with some inputs, that you have collected for training may also the called the &quot;ground truth&quot;.</p>
  <p>We do not need <em>all</em> possible values though, but enough examples that the neural network can interpolate between them. How many examples that is depends on the complexity of the function we want to learn.</p>
  <blockquote>
  <p>So what problem does the neural network really solve?</p>
  </blockquote>
  <p>There are three main things it solves, and these are shared with most other machine learning approaches:</p>
  <ul>
  <li><p>The neural network learns a function from examples of input and output.</p>
  </li>
  <li><p>The neural network will learn an <em>expected</em> value (or for classifiers, a probability distribution) when trained using noisy or stochastic data.</p>
  </li>
  <li><p>The neural network makes few assumptions about the relationship between input and output, and can learn successfully even for quite complex relationships.</p>
  </li>
  </ul>
  <p>These traits are all useful when you do not have a strong sense of what the correct function should be, in terms of writing an equation, but do have many examples of it.</p>
  <blockquote>
  <p>What about when we choose a value of dosage which has not been observed, for example, 0.25?</p>
  </blockquote>
  <p>The neural network will still produce an output. In a very simple scenario, where you had trained with example inputs at e.g. 0.2 and 0.3, then the output will likely be somewhere between the outputs for those two values. For a neural network, this in-between value can be much more sophisticated than a simple mean of the nearest examples. ML that uses the nearest values exists, that is called <a href="https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm" rel="nofollow noreferrer">k-nearest neighbours</a>.</p>
  <p>If this process has worked well, and the trained neural network produces useful, accurate predictions from unseen inputs, <a href="https://deeplearningdemystified.com/article/fdl-5" rel="nofollow noreferrer">it is said to generalise well</a>. Very often, that is the goal for training a neural network or other machine learning system.</p>
  <p>It is worth mentioning some additional facts and features of training neural networks (and ML in general):</p>
  <ul>
  <li><p>When generalisation is the goal (and it often is), then you need to test for it. This is done by keeping some example data back, not using it to train, but instead using it to check results on unseen inputs. In fact, this is so important, the data is often split into three sets - a training set, <a href="https://machinelearningmastery.com/difference-test-validation-datasets/" rel="nofollow noreferrer">a cross-validation (aka development) set, and a test set</a>.</p>
  </li>
  <li><p>The lack of assumptions in the basic model can lead to needing many training examples. If you know something specific or useful about the function being learned, you can pre-process the inputs to help - this is called feature engineering.</p>
  </li>
  <li><p>Machine learning can be good at interpolation, i.e. calculating outputs for inputs that are not in the original training data, when the unseen inputs are in-between or close to the training examples. Even when good at interpolation, it will still be bad at extrapolating to new unseen inputs that are outside of the ranges of the training examples. That is because it has used a very general/flexible system to fit some line or curve to examples, it has not learned an analytical function.</p>
  </li>
  </ul>
  <p>Exceptions to all of these points exist. They are the norm, but it will depend on the details of what you are trying to do.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-18T17:47:48.913Z
Answers.Text: Thank you! appreciate the efforts you've put into your post! Will upvoted :)
  Do you have any recommendations for good books, articles? Ive made a note of the ones you provied alreayd
Answers.UserDisplayName: LinusMagnola
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-18T17:57:17.350Z
Answers.Text: I learned the basics from Coursera courses. https://www.coursera.org/learn/machine-learning is still very good because it doesn't dive into theory too heavily and teaches good practice (test/train split) from the beginning
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-18T14:52:00.837Z
Answers.LastActivityDate: 2021-09-20T13:25:26.580Z
Answers.LastEditDate: 2021-09-20T13:25:26.580Z
Answers.UserDisplayName: Neil Slater
Body: <p>In the image below taken from a Youtube video, the author explains that the neural network can be used to fit a relational graph for a set of data points shown by the green line. And that this is accomplished by using weights, biases and activation functions.</p>
  <p>My slight confusion is that, initially, the weights and biases and randomized, and they are re-adjusted by backpropagation. This means that, at the end of the output layer, we must have the actual values of the target function anyway.</p>
  <p>So what problem does the neural network really solve?</p>
  <p>So, for example, we want to find the target function for dosage and efficacy, we are given the data points shown in blue. If we initially choose randomized values for the weights, biases and activation function, then, at the output layer, we determine an output value for efficacy, but there is no way to know whether this value is in fact correct or not. So, we need the actual values to determine the difference.</p>
  <p>What about when we choose a value of dosage which has not been observed, for example, 0.25? Doesn't this rely upon a best-fit relation graph that has already been fitted to the data prior to adjusting the neural network?</p>
  <p><a href="https://i.sstatic.net/0GfpU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0GfpU.png" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-20T13:27:46.293Z
Comments.Text: Hello. Your questions are all legitimate, but, please, next time, [**ask only one question per post**](https://meta.stackexchange.com/a/39224). If you have multiple questions, ask one for each post.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-20T21:30:48.537Z
Comments.Text: Note that real neural networks typically have lots of input dimensions. With only one input dimension, we can usually just interpolate the known data points.
Comments.UserDisplayName: Criticize SE actions means ban
Tags: <neural-networks><training><supervised-learning><labeled-datasets>
Title: What problem does the neural network really solve?
UserDisplayName: LinusMagnola
ThreadText: # What problem does the neural network really solve?
  
  (Asked by: username_0 on 2021-09-18)
  
  In the image below taken from a Youtube video, the author explains that the neural network can be used to fit a relational graph for a set of data points shown by the green line. And that this is accomplished by using weights, biases and activation functions.
  
  My slight confusion is that, initially, the weights and biases and randomized, and they are re-adjusted by backpropagation. This means that, at the end of the output layer, we must have the actual values of the target function anyway.
  
  So what problem does the neural network really solve?
  
  So, for example, we want to find the target function for dosage and efficacy, we are given the data points shown in blue. If we initially choose randomized values for the weights, biases and activation function, then, at the output layer, we determine an output value for efficacy, but there is no way to know whether this value is in fact correct or not. So, we need the actual values to determine the difference.
  
  What about when we choose a value of dosage which has not been observed, for example, 0.25? Doesn't this rely upon a best-fit relation graph that has already been fitted to the data prior to adjusting the neural network?
  
  [![enter image description here](https://i.sstatic.net/0GfpU.png)](https://i.sstatic.net/0GfpU.png)
  
  **Tags:** neural-networks, training, supervised-learning, labeled-datasets
  > **Comments:**
  > **username_1**: Hello. Your questions are all legitimate, but, please, next time, [**ask only one question per post**](https://meta.stackexchange.com/a/39224). If you have multiple questions, ask one for each post.  
  > **username_2**: Note that real neural networks typically have lots of input dimensions. With only one input dimension, we can usually just interpolate the known data points.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2021-09-18. Score: 0 | Accepted answer
  
  > This means that, at the end of the output layer, we must have the actual values of the target function anyway.
  
  Yes, this is necessary for supervised learning. You will often see this called a *labelled* dataset, where the "label" is an output value that you know is associated with each input. A set of labels associated with some inputs, that you have collected for training may also the called the "ground truth".
  
  We do not need *all* possible values though, but enough examples that the neural network can interpolate between them. How many examples that is depends on the complexity of the function we want to learn.
  
  > So what problem does the neural network really solve?
  
  There are three main things it solves, and these are shared with most other machine learning approaches:
  
  * The neural network learns a function from examples of input and output.
  * The neural network will learn an *expected* value (or for classifiers, a probability distribution) when trained using noisy or stochastic data.
  * The neural network makes few assumptions about the relationship between input and output, and can learn successfully even for quite complex relationships.
  
  These traits are all useful when you do not have a strong sense of what the correct function should be, in terms of writing an equation, but do have many examples of it.
  
  > What about when we choose a value of dosage which has not been observed, for example, 0.25?
  
  The neural network will still produce an output. In a very simple scenario, where you had trained with example inputs at e.g. 0.2 and 0.3, then the output will likely be somewhere between the outputs for those two values. For a neural network, this in-between value can be much more sophisticated than a simple mean of the nearest examples. ML that uses the nearest values exists, that is called [k-nearest neighbours](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm).
  
  If this process has worked well, and the trained neural network produces useful, accurate predictions from unseen inputs, [it is said to generalise well](https://deeplearningdemystified.com/article/fdl-5). Very often, that is the goal for training a neural network or other machine learning system.
  
  It is worth mentioning some additional facts and features of training neural networks (and ML in general):
  
  * When generalisation is the goal (and it often is), then you need to test for it. This is done by keeping some example data back, not using it to train, but instead using it to check results on unseen inputs. In fact, this is so important, the data is often split into three sets - a training set, [a cross-validation (aka development) set, and a test set](https://machinelearningmastery.com/difference-test-validation-datasets/).
  * The lack of assumptions in the basic model can lead to needing many training examples. If you know something specific or useful about the function being learned, you can pre-process the inputs to help - this is called feature engineering.
  * Machine learning can be good at interpolation, i.e. calculating outputs for inputs that are not in the original training data, when the unseen inputs are in-between or close to the training examples. Even when good at interpolation, it will still be bad at extrapolating to new unseen inputs that are outside of the ranges of the training examples. That is because it has used a very general/flexible system to fit some line or curve to examples, it has not learned an analytical function.
  
  Exceptions to all of these points exist. They are the norm, but it will depend on the details of what you are trying to do.
  
  > **Comments:**
  > **username_0**: Thank you! appreciate the efforts you've put into your post! Will upvoted :) Do you have any recommendations for good books, articles? Ive made a note of the ones you provied alreayd  
  > **username_3**: I learned the basics from Coursera courses. https://www.coursera.org/learn/machine-learning is still very good because it doesn't dive into theory too heavily and teaches good practice (test/train split) from the beginning  
  
  ---
  
  