Answers.Body: <p>Yes, You just weight the entries of loss function like sum( Wi(li-t2)**2) for MSE. Most frameworks provides this ability. For example in keras fit method has a parameter - sample_weight: Optional Numpy array of weights for the training samples.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-07T18:14:29.263Z
Answers.LastActivityDate: 2018-03-07T18:14:29.263Z
Answers.UserDisplayName: user2674414
Answers.Body: <ul>
  <li><p>I think you are looking for "Class Balancing" if I understand your question correctly. In most frameworks you can pass an additional weights tensor/array to the loss function/criterion. This is essentially just a weighting factor for each loss term in the sum of the total loss. Through that you achieve that the error/loss for some classes are weighted higher than other classes. Usually you weight classes higher that are less present in your dataset to emphasize that these are not "ignored" by your network over other classes.</p></li>
  <li><p>Second what you can do if it's your data samples that are imbalanced and not the trained classes you can of course weight the data sampling of your dataloader. Instead of using a uniform distribution over all data samples you can weight specific samples higher or lower so that they are shown more/less often to the network.</p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-08T11:32:09.517Z
Answers.LastActivityDate: 2018-03-09T09:29:08.607Z
Answers.LastEditDate: 2018-03-09T09:29:08.607Z
Answers.UserDisplayName: Marcel_marcel1991
Body: <p>Let us for these purposes say with are working with any feed forward neural network.</p>
  
  <p>Let us also say, that we know beforehand that certain portion of our dataset arsignificantly more impactful or important to our underlying representation. Is there anyway to add that “weighting” to our data?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-07T04:34:53.917Z
Comments.Text: Please clarify what algorithm you are using, the answer will vary significantly.
Comments.UserDisplayName: Andrew Butler
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-07T05:43:26.460Z
Comments.Text: You can add a bias to your step function
Comments.UserDisplayName: solarflare
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-07T18:28:34.977Z
Comments.Text: You could add some sort of "Experience replay" algorithm to pass the same data several times.
Comments.UserDisplayName: Aleksei Maide
Tags: <training><datasets>
Title: A way to give more weight to particular data?
UserDisplayName: hisairnessag3
ThreadText: # A way to give more weight to particular data?
  
  (Asked by: username_0 on 2018-03-07)
  
  Let us for these purposes say with are working with any feed forward neural network.
  
  Let us also say, that we know beforehand that certain portion of our dataset arsignificantly more impactful or important to our underlying representation. Is there anyway to add that “weighting” to our data?
  
  **Tags:** training, datasets
  > **Comments:**
  > **username_1**: Please clarify what algorithm you are using, the answer will vary significantly.  
  > **username_2**: You can add a bias to your step function  
  > **username_3**: You could add some sort of "Experience replay" algorithm to pass the same data several times.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2018-03-07. Score: 1 | Accepted answer
  
  Yes, You just weight the entries of loss function like sum( Wi(li-t2)\*\*2) for MSE. Most frameworks provides this ability. For example in keras fit method has a parameter - sample\_weight: Optional Numpy array of weights for the training samples.
  
  
  ---
  
  ### Answer by username_5 on 2018-03-08. Score: 1
  
  * I think you are looking for "Class Balancing" if I understand your question correctly. In most frameworks you can pass an additional weights tensor/array to the loss function/criterion. This is essentially just a weighting factor for each loss term in the sum of the total loss. Through that you achieve that the error/loss for some classes are weighted higher than other classes. Usually you weight classes higher that are less present in your dataset to emphasize that these are not "ignored" by your network over other classes.
  * Second what you can do if it's your data samples that are imbalanced and not the trained classes you can of course weight the data sampling of your dataloader. Instead of using a uniform distribution over all data samples you can weight specific samples higher or lower so that they are shown more/less often to the network.
  
  
  ---
  
  