code: def get_term_count_mat(self):
          '''
          Returns
          -------
          np.array with columns as categories and rows as terms
          '''
          freq_mat = np.zeros(shape=(self.get_num_terms(), self.get_num_categories()), dtype=int)
          for cat_i in range(self.get_num_categories()):
              X = (self._X[self._y == cat_i, :] > 0).astype(int)
              freq_mat[:, cat_i] = X.sum(axis=0)
          return freq_maf get_term_count_mat(self):
          '''
          Returns
          -------
          np.array with columns as categories and rows as terms
          '''
          freq_mat = np.zeros(shape=(self.get_num_terms(), self.get_num_categories()), dtype=int)
          for cat_i in range(self.get_num_categories()):
              X = (self._X[self._y == cat_i, :] > 0).astype(int)
              freq_mat[:, cat_i] = X.sum(axis=0)
          return freq_mat
docs: Returns
          -------
          np.array with columns as categories and rows as terms