docstr: Method to combine two bi-cluters based on min value (Merge on line or columns)
docstr_tok: ["Method","to","combine","two","bi-cluters","based","on","min","value","(","Merge","on","line","or","columns",")"]
code: def merge(self, min_value_row, min_value_col):
      """
      Method to combine two bi-cluters based on min value (Merge on line or columns)
  
      """
  
      if min_value_row[0] > min_value_col[0]:
          # merge of columns
          pair = min_value_col[1]
  
          new_set_col = (
              self.list_col[pair[0]].copy()
              + self.list_col[pair[1]].copy()
          )
          self.list_col = list(
              np.delete(self.list_col, [pair[0], pair[1]], axis=0)
          )
          self.list_col.append(new_set_col)
  
          # update count total based on columns
          new_count_total = (
              self.count_total[:, pair[0]]
              + self.count_total[:, pair[1]]
          )
          self.count_total = np.delete(
              self.count_total, (pair[0], pair[1]), axis=1
          )
          self.count_total = np.insert(
              self.count_total,
              self.count_total.shape[1],
              new_count_total.T,
              axis=1,
          )
  
          # update count ones based on columns
          new_count_ones = (
              self.count_ones[:, pair[0]] + self.count_ones[:, pair[1]]
          )
          self.count_ones = np.delete(
              self.count_ones, (pair[0], pair[1]), axis=1
          )
          self.count_ones = np.insert(
              self.count_ones,
              self.count_ones.shape[1],
              new_count_ones.T,
              axis=1,
          )
  
      else:
          # merge of rows
          pair = min_value_row[1]
  
          new_set_row = (
              self.list_row[pair[0]].copy()
              + self.list_row[pair[1]].copy()
          )
          self.list_row = list(
              np.delete(self.list_row, [pair[0], pair[1]], axis=0)
          )
          self.list_row.append(new_set_row)
  
          # update count total based on rows
          new_count_total = (
              self.count_total[pair[0], :]
              + self.count_total[pair[1], :]
          )
          self.count_total = np.delete(
              self.count_total, (pair[0], pair[1]), axis=0
          )
          self.count_total = np.insert(
              self.count_total,
              self.count_total.shape[0],
              new_count_total,
              axis=0,
          )
  
          # update count ones based on rows
          new_count_ones = (
              self.count_ones[pair[0], :] + self.count_ones[pair[1], :]
          )
          self.count_ones = np.delete(
              self.count_ones, (pair[0], pair[1]), axis=0
          )
          self.count_ones = np.insert(
              self.count_ones,
              self.count_ones.shape[0],
              new_count_ones,
              axis=0,
          )
  
      self.update_information()
  
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 8 for calling the PaCo obj's underlying member method code with example usage: obj.merge(min_value_row, min_value_col) without return types