Answers.Body: <p>A critical goal of training a neural network is to minimize the loss.  Loss is not explained for spaCy because it is a general concept for machine learning and deep learning.  Loss is not specific to spaCy and although there are some finer details I don't believe that is your inquiry.</p>
  <p>In general, to understand loss functions, I recommend the following resources:</p>
  <ul>
  <li><a href="https://machinelearningmastery.com/loss-and-loss-functions-for-training-deep-learning-neural-networks/" rel="nofollow noreferrer">Loss and Loss Functions for Training Deep Learning Neural Networks</a> by Jason Brownlee.  Jason writes some great articles and tutorials and I highly suggest reading his other articles and books.</li>
  <li><a href="https://algorithmia.com/blog/introduction-to-loss-functions" rel="nofollow noreferrer">Introduction to Loss Functions</a></li>
  <li><a href="https://medium.com/ai%C2%B3-theory-practice-business/loss-functions-in-machine-learning-for-beginners-fastai-lesson-9-homework-2-2121954f1f77" rel="nofollow noreferrer">Loss Functions in Machine Learning for Beginners</a> by John Kaller</li>
  </ul>
  <p>If you like videos watch:</p>
  <ul>
  <li><a href="https://www.youtube.com/watch?v=IVVVjBSk9N0" rel="nofollow noreferrer">Loss Functions Explained</a> by Siraj Raval.  Siraj has many great videos on machine learning.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-08T14:50:21.233Z
Answers.LastActivityDate: 2021-01-08T15:01:59.910Z
Answers.LastEditDate: 2021-01-08T15:01:59.910Z
Answers.UserDisplayName: Brian O'Donnell
Body: <p>From the tid-bits, I understand of neural networks (NN), the Loss function is the difference between predicted output and expected output of the NN. I am following <a href="https://github.com/explosion/spaCy/blob/master/examples/training/train_ner.py" rel="nofollow noreferrer">this tutorial</a>, the losses are included at line #81 in the <code>nlp.update()</code> function.</p>
  <p>I am getting losses in the range 300-100. How to interpret them? <strong>What should be the ideal output of this losses variable</strong>? I went through Spacy's documentation, but nothing much is written there about losses. Also, please let me know the links to relevant theories to understand this in general.</p>
  
Tags: <machine-learning><natural-language-processing><objective-functions><spacy><named-entity-recognition>
Title: How to understand 'losses' in Spacy's custom NER training engine?
UserDisplayName: The White Cloud
ThreadText: # How to understand 'losses' in Spacy's custom NER training engine?
  
  (Asked by: username_0 on 2021-01-08)
  
  From the tid-bits, I understand of neural networks (NN), the Loss function is the difference between predicted output and expected output of the NN. I am following [this tutorial](https://github.com/explosion/spaCy/blob/master/examples/training/train_ner.py), the losses are included at line #81 in the `nlp.update()` function.
  
  I am getting losses in the range 300-100. How to interpret them? **What should be the ideal output of this losses variable**? I went through Spacy's documentation, but nothing much is written there about losses. Also, please let me know the links to relevant theories to understand this in general.
  
  **Tags:** machine-learning, natural-language-processing, objective-functions, spacy, named-entity-recognition
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-01-08. Score: 2 | Accepted answer
  
  A critical goal of training a neural network is to minimize the loss. Loss is not explained for spaCy because it is a general concept for machine learning and deep learning. Loss is not specific to spaCy and although there are some finer details I don't believe that is your inquiry.
  
  In general, to understand loss functions, I recommend the following resources:
  
  * [Loss and Loss Functions for Training Deep Learning Neural Networks](https://machinelearningmastery.com/loss-and-loss-functions-for-training-deep-learning-neural-networks/) by Jason Brownlee. Jason writes some great articles and tutorials and I highly suggest reading his other articles and books.
  * [Introduction to Loss Functions](https://algorithmia.com/blog/introduction-to-loss-functions)
  * [Loss Functions in Machine Learning for Beginners](https://medium.com/ai%C2%B3-theory-practice-business/loss-functions-in-machine-learning-for-beginners-fastai-lesson-9-homework-2-2121954f1f77) by John Kaller
  
  If you like videos watch:
  
  * [Loss Functions Explained](https://www.youtube.com/watch?v=IVVVjBSk9N0) by Siraj Raval. Siraj has many great videos on machine learning.
  
  
  ---
  
  