class_docstr: Objects of this abstract class realize the transformation between word-document co-occurrence
  matrix (int) into a BM25 matrix (positive floats). Concrete subclasses of this abstract class
  implement different BM25 scoring functions.
class_docstr_tok: ["Objects","of","this","abstract","class","realize","the","transformation","between","word-document","co-occurrence","matrix","(","int",")","into","a","BM25","matrix","(","positive","floats",")",".","Concrete","subclasses","of","this","abstract","class","implement","different","BM25","scoring","functions","."]
docstr: Precompute inverse term document frequencies, which will be used to weight term frequencies
  for the documents.
  
  Parameters
  ----------
  dfs : dict of (int, int)
      A mapping from term ids to term document frequencies.
  num_docs : int
      The total number of documents in the training corpus.
  
  Returns
  -------
  idfs : dict of (int, float)
      A mapping from term ids to inverse term document frequencies.
docstr_tok: ["Precompute","inverse","term","document","frequencies",",","which","will","be","used","to","weight","term","frequencies","for","the","documents",".","Parameters","--","--","--","--","--","dfs",":","dict","of","(","int",",","int",")","A","mapping","from","term","ids","to","term","document","frequencies",".","num_docs",":","int","The","total","number","of","documents","in","the","training","corpus",".","Returns","--","--","--","-","idfs",":","dict","of","(","int",",","float",")","A","mapping","from","term","ids","to","inverse","term","document","frequencies","."]
code: def precompute_idfs(self, dfs, num_docs):
      """Precompute inverse term document frequencies, which will be used to weight term frequencies
      for the documents.
  
      Parameters
      ----------
      dfs : dict of (int, int)
          A mapping from term ids to term document frequencies.
      num_docs : int
          The total number of documents in the training corpus.
  
      Returns
      -------
      idfs : dict of (int, float)
          A mapping from term ids to inverse term document frequencies.
  
      """
      pass
  
imports: from abc import ABCMeta, abstractmethod
  from collections import defaultdict
  import logging
  import math
  from gensim import interfaces, utils
  import numpy
label_desc: Use image node_id 2 for calling the BM25ABC obj's underlying member method code with example usage: obj.precompute_idfs(dfs, num_docs) without return types