docstr: Metric from Burch (2017).
  
  Brent Burch, Jesse Egbertb and Douglas Biber. Measuring Lexical Dispersion in Corpus Linguistics. JRDS. 2016.
  Article: https://journal.equinoxpub.com/JRDS/article/view/9480
  
  D_A = 1 - ((n * (n - 1))/2) * sum_{i in 0, n - 1} sum{j in i + 1, n} |v_i - v_j|/(2*mean(v))
  
  :return:
docstr_tok: ["Metric","from","Burch","(","2017",")",".","Brent","Burch",",","Jesse","Egbertb","and","Douglas","Biber",".","Measuring","Lexical","Dispersion","in","Corpus","Linguistics",".","JRDS",".","2016",".","Article",":","https",":","\/\/journal.equinoxpub.com\/JRDS\/article\/view\/9480","D_A","=","1","-","(","(","n","*","(","n","-","1",")",")","\/2",")","*","sum_","{","i","in","0",",","n","-","1","}","sum","{","j","in","i","+","1",",","n","}","|v_i","-","v_j|\/","(","2","*","mean","(","v",")",")",":","return",":"]
code: def da(self):
      """
      Metric from Burch (2017).
  
      Brent Burch, Jesse Egbertb and Douglas Biber. Measuring Lexical Dispersion in Corpus Linguistics. JRDS. 2016.
      Article: https://journal.equinoxpub.com/JRDS/article/view/9480
  
      D_A = 1 - ((n * (n - 1))/2) * sum_{i in 0, n - 1} sum{j in i + 1, n} |v_i - v_j|/(2*mean(v))
  
      :return:
      """
      n = self.n
  
      constant = 1.0 / (n * (n - 1) / 2)
  
      it = range(self.v.shape[1])
      if self.tqdm is not None:
          it = self.tqdm(it)
  
      da = []
      for word_i in it:
          v_word_id = self.v.T[word_i]
          if type(v_word_id) != np.ndarray:
              y = v_word_id.todense().A1
          else:
              y = v_word_id
          yt = np.tile(y, (n, 1))
          pairs_sum = np.sum(np.abs(yt - yt.T)) / 2
          da_score = 1 - pairs_sum * constant / (2 * y.mean())
          da.append(da_score)
  
      da_vec = np.array(da)
      da_vec[da_vec < 0] = 0  # correct for floating point issues
      return da_vec
  
imports: from typing import Optional, Callable, List
  import numpy
  import pandas
  from scattertext.termranking import AbsoluteFrequencyRanker
  from scipy.sparse import csc_matrix, csr_matrix
  from sklearn.preprocessing import StandardScaler
  from scattertext.smoothing.lowess import Lowess
  from scattertext.termranking.TermRanker import TermRanker
  from scattertext.TermDocMatrix import TermDocMatrix
label_desc: Use image node_id 11 for calling the Dispersion obj's underlying member method code with example usage: obj.da() and returns: da_vec