title: gensim Word2Vec - how to apply stochastic gradient descent?
body: <p>To my understanding, batch (vanilla) gradient descent makes one parameter update for all training data. Stochastic gradient descent (SGD) allows you to update parameter for each training sample, helping the model to converge faster, at the cost of high fluctuation in function loss. </p>
  
  <p><a href="https://i.stack.imgur.com/0LGA5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0LGA5.png" alt="enter image description here"></a></p>
  
  <p>Batch (vanilla) gradient descent sets <code>batch_size=corpus_size</code>.</p>
  
  <p>SGD sets <code>batch_size=1</code>.</p>
  
  <p>And mini-batch gradient descent sets <code>batch_size=k</code>, in which <code>k</code> is usually 32, 64, 128...</p>
  
  <p>How does gensim apply SGD or mini-batch gradient descent? It seems that <code>batch_words</code> is the equivalent of <code>batch_size</code>, but I want to be sure. </p>
  
  <p>Is setting <code>batch_words=1</code> in gensim model equivalent to applying SGD?</p>