class_docstr: Online Non-Negative Matrix Factorization.
  
  `Renbo Zhao et al :"Online Nonnegative Matrix Factorization with Outliers" <https://arxiv.org/abs/1604.02634>`_
class_docstr_tok: ["Online","Non-Negative","Matrix","Factorization",".","`","Renbo","Zhao","et","al",":","''","Online","Nonnegative","Matrix","Factorization","with","Outliers","''","<","https",":","\/\/arxiv.org\/abs\/1604.02634",">","`","_"]
docstr: Infer info from the first batch and initialize the matrices.
  
  Parameters
  ----------
  v : `csc_matrix` with the shape (n_tokens, chunksize)
      Batch of bows.
docstr_tok: ["Infer","info","from","the","first","batch","and","initialize","the","matrices",".","Parameters","--","--","--","--","--","v",":","`","csc_matrix","`","with","the","shape","(","n_tokens",",","chunksize",")","Batch","of","bows","."]
code: def _setup(self, v):
      """Infer info from the first batch and initialize the matrices.
  
      Parameters
      ----------
      v : `csc_matrix` with the shape (n_tokens, chunksize)
          Batch of bows.
  
      """
      self.w_std = np.sqrt(
          v.mean() / (self.num_tokens * self.num_topics)
      )
  
      self._W = np.abs(
          self.w_std
          * halfnorm.rvs(
              size=(self.num_tokens, self.num_topics),
              random_state=self.random_state,
          )
      )
  
      self.A = np.zeros((self.num_topics, self.num_topics))
      self.B = np.zeros((self.num_tokens, self.num_topics))
  
imports: import collections.abc
  import logging
  import numpy
  import scipy.sparse
  from scipy.stats import halfnorm
  from gensim import interfaces
  from gensim import matutils
  from gensim import utils
  from gensim.interfaces import TransformedCorpus
  from gensim.models import basemodel, CoherenceModel
  from gensim.models.nmf_pgd import solve_h
label_desc: Use image node_id 10 for calling the Nmf obj's underlying member method code with example usage: obj._setup(v) without return types