class_docstr: Log likelihood ratio (inspired by https://github.com/Zeta-and-Company/pydistinto/blob/main/scripts/measures/LLR.py)
class_docstr_tok: ["Log","likelihood","ratio","(","inspired","by","https",":","\/\/github.com\/Zeta-and-Company\/pydistinto\/blob\/main\/scripts\/measures\/LLR.py",")"]
code: def _get_llr_score(self, cat_X, ncat_X):
      a = cat_X.sum(axis=0).A1
      b = ncat_X.sum(axis=0).A1
      exp1 = (sum(a) * (a + b)) / (sum(a) + sum(b))
      exp2 = (sum(b) * (a + b)) / (sum(a) + sum(b))
      return power_divergence([a, b], f_exp=[exp1, exp2])
  
file_path: scattertext/scattertext/termscoring/loglikelihoodratio.py
imports: import pandas
  from scipy.stats import power_divergence
  from scattertext.termscoring.CorpusBasedTermScorer import CorpusBasedTermScorer
label_desc: Use image node_id 5 for calling the LogLikelihoodRatio obj's underlying member method code with example usage: obj._get_llr_score(cat_X, ncat_X) and returns: power_divergence