class_docstr: Objects of this class realize the explicit normalization of vectors (l1 and l2).
docstr: Compute the l1 or l2 normalization by normalizing separately for each document in a corpus.
  
  If :math:`v_{i,j}` is the 'i'th component of the vector representing document 'j', the l1 normalization is
  
  .. math:: l1_{i, j} = \frac{v_{i,j}}{\sum_k |v_{k,j}|}
  
  the l2 normalization is
  
  .. math:: l2_{i, j} = \frac{v_{i,j}}{\sqrt{\sum_k v_{k,j}^2}}
  
  
  Parameters
  ----------
  corpus : iterable of iterable of (int, number), optional
      Input corpus.
  norm : {'l1', 'l2'}, optional
      Norm used to normalize.
code: def __init__(self, corpus=None, norm="l2"):
      r"""Compute the l1 or l2 normalization by normalizing separately for each document in a corpus.
  
      If :math:`v_{i,j}` is the 'i'th component of the vector representing document 'j', the l1 normalization is
  
      .. math:: l1_{i, j} = \frac{v_{i,j}}{\sum_k |v_{k,j}|}
  
      the l2 normalization is
  
      .. math:: l2_{i, j} = \frac{v_{i,j}}{\sqrt{\sum_k v_{k,j}^2}}
  
  
      Parameters
      ----------
      corpus : iterable of iterable of (int, number), optional
          Input corpus.
      norm : {'l1', 'l2'}, optional
          Norm used to normalize.
  
      """
      self.norm = norm
      if corpus is not None:
          self.calc_norm(corpus)
      else:
          pass
  
file_path: gensim/gensim/models/normmodel.py
imports: import logging
  from gensim import interfaces, matutils
label_desc: Use image node_id 1 to create a new NormModel object from inherited base classes: interfaces with example: obj = NormModel(corpus, norm)