docstr: Computes balanced scaled f-scores
  Parameters
  ----------
  cat_word_counts : np.array
      category counts
  not_cat_word_counts : np.array
      not category counts
  scaler_algo : str
      Function that scales an array to a range \in [0 and 1]. Use 'percentile', 'normcdf'. Default.
  beta : float
      Beta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Default.
  Returns
  -------
      np.array
      Harmonic means of scaled P(word|category)
       and scaled P(category|word) for >median half of scores.  Low scores are harmonic means
       of scaled P(word|~category) and scaled P(~category|word).  Array is squashed to between
       0 and 1, with 0.5 indicating a median score.
docstr_tok: ["Computes","balanced","scaled","f-scores","Parameters","--","--","--","--","--","cat_word_counts",":","np.array","category","counts","not_cat_word_counts",":","np.array","not","category","counts","scaler_algo",":","str","Function","that","scales","an","array","to","a","range","\\in","[","0","and","1","]",".","Use","'percentile","'",",","'normcdf","'",".","Default",".","beta",":","float","Beta","in","(","1+B^2",")","*","(","Scale","(","P","(","w|c",")",")","*","Scale","(","P","(","c|w",")",")",")","\/","(","B^2","*","Scale","(","P","(","w|c",")",")","+","Scale","(","P","(","c|w",")",")",")",".","Default",".","Returns","--","--","--","-","np.array","Harmonic","means","of","scaled","P","(","word|category",")","and","scaled","P","(","category|word",")","for",">","median","half","of","scores",".","Low","scores","are","harmonic","means","of","scaled","P","(","word|~category",")","and","scaled","P","(","~category|word",")",".","Array","is","squashed","to","between","0","and","1",",","with","0.5","indicating","a","median","score","."]
code: def get_scores(
      cat_word_counts,
      not_cat_word_counts,
      scaler_algo=DEFAULT_SCALER_ALGO,
      beta=DEFAULT_BETA,
  ):
      """Computes balanced scaled f-scores
      Parameters
      ----------
      cat_word_counts : np.array
          category counts
      not_cat_word_counts : np.array
          not category counts
      scaler_algo : str
          Function that scales an array to a range \in [0 and 1]. Use 'percentile', 'normcdf'. Default.
      beta : float
          Beta in (1+B^2) * (Scale(P(w|c)) * Scale(P(c|w)))/(B^2*Scale(P(w|c)) + Scale(P(c|w))). Default.
      Returns
      -------
          np.array
          Harmonic means of scaled P(word|category)
           and scaled P(category|word) for >median half of scores.  Low scores are harmonic means
           of scaled P(word|~category) and scaled P(~category|word).  Array is squashed to between
           0 and 1, with 0.5 indicating a median score.
      """
  
      cat_scores = ScaledFScore.get_scores_for_category(
          cat_word_counts, not_cat_word_counts, scaler_algo, beta
      )
      not_cat_scores = ScaledFScore.get_scores_for_category(
          not_cat_word_counts, cat_word_counts, scaler_algo, beta
      )
      return ScoreBalancer.balance_scores(cat_scores, not_cat_scores)
  
imports: from abc import ABC, abstractmethod
  import numpy
  import pandas
  from scipy.stats import norm, rankdata
  from scattertext.Common import DEFAULT_SCALER_ALGO, DEFAULT_BETA
label_desc: Use image node_id 2 for calling the ScaledFScore obj's underlying member method code with example usage: obj.get_scores(cat_word_counts, not_cat_word_counts, scaler_algo, beta) and returns: ScoreBalancer