class_docstr: Supervised method (supports ONLY binary classification)
  transform a count matrix to a normalized TfBNS representation
  Tf means term-frequency while OR means odds ratio.
  Parameters
  ----------
  norm : 'l1', 'l2', 'max' or None, optional
      Norm used to normalize term vectors. None for no normalization.
  smooth_df : boolean or int, default=True
      Smooth df weights by adding one to document frequencies, as if an
      extra document was seen containing every term in the collection
      exactly once. Prevents zero divisions.
  sublinear_tf : boolean, default=False
      Apply sublinear tf scaling, i.e. replace tf with 1 + log(tf).
  References
  ----------
  .. [George Forman] https://www.researchgate.net/publ     ication/221613942_BNS_feature_scaling_An_improved_representation_over_TF-ID     F_for_SVM_text_classification
class_docstr_tok: ["Supervised","method","(","supports","ONLY","binary","classification",")","transform","a","count","matrix","to","a","normalized","TfBNS","representation","Tf","means","term-frequency","while","OR","means","odds","ratio",".","Parameters","--","--","--","--","--","norm",":","'l1","'",",","'l2","'",",","'max","'","or","None",",","optional","Norm","used","to","normalize","term","vectors",".","None","for","no","normalization",".","smooth_df",":","boolean","or","int",",","default=True","Smooth","df","weights","by","adding","one","to","document","frequencies",",","as","if","an","extra","document","was","seen","containing","every","term","in","the","collection","exactly","once",".","Prevents","zero","divisions",".","sublinear_tf",":","boolean",",","default=False","Apply","sublinear","tf","scaling",",","i.e",".","replace","tf","with","1","+","log","(","tf",")",".","References","--","--","--","--","--","..","[","George","Forman","]","https",":","\/\/www.researchgate.net\/publ","ication\/221613942_BNS_feature_scaling_An_improved_representation_over_TF-ID","F_for_SVM_text_classification"]
code: def transform(self, X):
      tp = self._tp
      fp = self._fp
      fn = self._fn
      tn = self._tn
  
      f = self._n_features
      tpr = tp / self._p
      fpr = fp / self._n
      min_bound, max_bound = 0.0005, 1 - 0.0005
      tpr[tpr < min_bound] = min_bound
      tpr[tpr > max_bound] = max_bound
      fpr[fpr < min_bound] = min_bound
      fpr[fpr > max_bound] = max_bound
      k = np.abs(norm.ppf(tpr) - norm.ppf(fpr))
      X = X * sp.spdiags(k, 0, f, f)
      if self.norm:
          X = normalize(X, self.norm, copy=False)
      return X
  
imports: import collections
  import itertools
  import numpy
  import scipy.sparse
  from scipy.stats import norm
  from sklearn.decomposition import TruncatedSVD
  from sklearn.preprocessing import normalize
  from sklearn.base import TransformerMixin, BaseEstimator
  from gensim.models.keyedvectors import BaseKeyedVectors
label_desc: Use image node_id 1 for calling the TfbnsVectorizer obj's underlying member method code with example usage: obj.transform(X) and returns: X