docstr: This method performs iterations of combination of bi-clusters.
docstr_tok: ["This","method","performs","iterations","of","combination","of","bi-clusters","."]
code: def fit(self):
      """
      This method performs iterations of combination of bi-clusters.
  
      """
  
      count_epoch = 0
      criteria = True
      # 1st step: run k-means
      self.run_kmeans()
      # 2st step: collect information (only one time)
      self.count_information()
  
      entropy0 = self.calculate_entropy()
  
      # 3st step: training the algorithm
      while criteria:
          old_density, old_list_row, old_list_col = (
              self.density.copy(),
              self.list_row.copy(),
              self.list_col.copy(),
          )
          distance_rows = np.divide(
              np.float32(squareform(pdist(self.density, "euclidean"))),
              self.density.shape[1],
          )
          distance_cols = np.divide(
              np.float32(
                  squareform(pdist(self.density.T, "euclidean"))
              ),
              self.density.shape[0],
          )
          min_row = self.return_min_value(distance_rows)
          min_col = self.return_min_value(distance_cols)
  
          self.merge(min_row, min_col)
  
          # Check the number os bi-clusters
          if len(self.list_row) == 1 and len(self.list_col) == 1:
              break
  
          entropy = self.calculate_entropy()
          dif_entropy = entropy - entropy0
          self.delta_entropy.append(dif_entropy)
          mean_range, std_range = np.mean(self.delta_entropy), np.std(
              self.delta_entropy
          )
  
          if not (
              mean_range - 3 * std_range
              <= dif_entropy
              <= mean_range + 3 * std_range
          ):
              self.density, self.list_row, self.list_col = (
                  old_density,
                  old_list_row,
                  old_list_col,
              )
              criteria = False
          else:
              entropy0 = entropy
              count_epoch += 1
  
      return entropy0
  
file_path: CaseRecommender/caserec/clustering/paco.py
imports: import itertools
  import random
  import numpy
  from scipy.spatial.distance import squareform, pdist
  from sklearn.cluster import KMeans
  from caserec.utils.process_data import ReadFile
label_desc: Use image node_id 9 for calling the PaCo obj's underlying member method code with example usage: obj.fit() and returns: entropy0