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: Get the most relevant topics to the given word.
  
  Parameters
  ----------
  word_id : int
      The word for which the topic distribution will be computed.
  minimum_probability : float, optional
      If `normalize` is True, topics with smaller probabilities are filtered out.
      If `normalize` is False, topics with smaller factors are filtered out.
      If set to None, a value of 1e-8 is used to prevent 0s.
  normalize: bool or None, optional
      Whether to normalize the result. Allows for estimation of perplexity, coherence, e.t.c.
  
  Returns
  -------
  list of (int, float)
      The relevant topics represented as pairs of their ID and their assigned probability, sorted
      by relevance to the given word.
docstr_tok: ["Get","the","most","relevant","topics","to","the","given","word",".","Parameters","--","--","--","--","--","word_id",":","int","The","word","for","which","the","topic","distribution","will","be","computed",".","minimum_probability",":","float",",","optional","If","`","normalize","`","is","True",",","topics","with","smaller","probabilities","are","filtered","out",".","If","`","normalize","`","is","False",",","topics","with","smaller","factors","are","filtered","out",".","If","set","to","None",",","a","value","of","1e-8","is","used","to","prevent","0s",".","normalize",":","bool","or","None",",","optional","Whether","to","normalize","the","result",".","Allows","for","estimation","of","perplexity",",","coherence",",","e.t.c",".","Returns","--","--","--","-","list","of","(","int",",","float",")","The","relevant","topics","represented","as","pairs","of","their","ID","and","their","assigned","probability",",","sorted","by","relevance","to","the","given","word","."]
code: def get_term_topics(
      self, word_id, minimum_probability=None, normalize=None
  ):
      """Get the most relevant topics to the given word.
  
      Parameters
      ----------
      word_id : int
          The word for which the topic distribution will be computed.
      minimum_probability : float, optional
          If `normalize` is True, topics with smaller probabilities are filtered out.
          If `normalize` is False, topics with smaller factors are filtered out.
          If set to None, a value of 1e-8 is used to prevent 0s.
      normalize: bool or None, optional
          Whether to normalize the result. Allows for estimation of perplexity, coherence, e.t.c.
  
      Returns
      -------
      list of (int, float)
          The relevant topics represented as pairs of their ID and their assigned probability, sorted
          by relevance to the given word.
  
      """
      if minimum_probability is None:
          minimum_probability = self.minimum_probability
      minimum_probability = max(minimum_probability, 1e-8)
  
      # if user enters word instead of id in vocab, change to get id
      if isinstance(word_id, str):
          word_id = self.id2word.doc2bow([word_id])[0][0]
  
      values = []
  
      word_topics = self._W[word_id]
  
      if normalize is None:
          normalize = self.normalize
      if normalize and word_topics.sum() > 0:
          word_topics /= word_topics.sum()
  
      for topic_id in range(0, self.num_topics):
          word_coef = word_topics[topic_id]
  
          if word_coef >= minimum_probability:
              values.append((topic_id, word_coef))
  
      return values
  
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 8 for calling the Nmf obj's underlying member method code with example usage: obj.get_term_topics(word_id, minimum_probability, normalize) and returns: values