Answers.Body: <p>I think i found out how that works, so i made a short article about it .
  <a href="https://medium.com/@kourloskostas/python-spam-filter-86b21d7d1564" rel="nofollow noreferrer">https://medium.com/@kourloskostas/python-spam-filter-86b21d7d1564</a>
  I hope it helps!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T09:50:49.497Z
Answers.Text: You are right ,will post the answer here as well
Answers.UserDisplayName: kostas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T22:22:28.733Z
Answers.Text: Actually, if you could excerpt the most salient passages from the medium article, that would really help with this answer, specifically.  (Welcome to SE:AI btw--glad to have you here!)
Answers.UserDisplayName: DukeZhou
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-15T00:23:52.263Z
Answers.Text: Thanks ! I will do my best to clear the article up!
Answers.UserDisplayName: kostas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-13T14:49:53.440Z
Answers.LastActivityDate: 2020-04-13T14:49:53.440Z
Answers.UserDisplayName: kostas
Body: <p>I am trying to use Logistic Regression to make a spam filter, but I am having trouble understanding the weight update part. I have processed my email dataset, and I have an attribute vector of the top n words that are most likely to be contained within a spam.</p>
  
  <p>From my understanding, during training, I will have to implement an optimization formula after each training example in order to update the weights.</p>
  
  <p><span class="math-container">$$
  w_l \leftarrow w_l + \eta \cdot \sum_{i=1}^m [ y^{(i)} - P(c_+ \mid \vec{x}^{(i)} )] \cdot x_l^{(i)}
  $$</span></p>
  
  <p>How does a formula such as this work? How can it be implemented in Python?</p>
  
Tags: <machine-learning><logistic-regression><text-classification>
Title: How does the weight update formula for logistic regression work?
UserDisplayName: kostas
ThreadText: # How does the weight update formula for logistic regression work?
  
  (Asked by: username_0 on 2020-01-15)
  
  I am trying to use Logistic Regression to make a spam filter, but I am having trouble understanding the weight update part. I have processed my email dataset, and I have an attribute vector of the top n words that are most likely to be contained within a spam.
  
  From my understanding, during training, I will have to implement an optimization formula after each training example in order to update the weights.
  
  $$
  w\_l \leftarrow w\_l + \eta \cdot \sum\_{i=1}^m [ y^{(i)} - P(c\_+ \mid \vec{x}^{(i)} )] \cdot x\_l^{(i)}
  $$
  
  How does a formula such as this work? How can it be implemented in Python?
  
  **Tags:** machine-learning, logistic-regression, text-classification
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-04-13. Score: 1
  
  I think i found out how that works, so i made a short article about it .
  <https://medium.com/@kourloskostas/python-spam-filter-86b21d7d1564>
  I hope it helps!
  
  > **Comments:**
  > **username_0**: You are right ,will post the answer here as well  
  > **username_1**: Actually, if you could excerpt the most salient passages from the medium article, that would really help with this answer, specifically.  (Welcome to SE:AI btw--glad to have you here!)  
  > **username_0**: Thanks ! I will do my best to clear the article up!  
  
  ---
  
  