docs: def confusion(df, labels=['neg', 'pos']):
      """ Binary classification confusion """
      c = pd.DataFrame(np.zeros((2, 2)), dtype=int)
      a, b = df.columns[:2]  # labels[df.columns[:2]]
      c.columns = sorted(set(df[a]))[:2]
      c.columns.name = a
      c.index = list(c.columns)
      c.index.name = b
      c1, c2 = c.columns
      c[c1][c1] = ((df[a] == c1) & (df[b] == c1)).sum()
      c[c1][c2] = ((df[a] == c1) & (df[b] == c2)).sum()
      c[c2][c2] = ((df[a] == c2) & (df[b] == c2)).sum()
      c[c2][c1] = ((df[a] == c2) & (df[b] == c1)).sum()
      return c