docstr: This method is responsible to filter the bi-groups removing the ones with lower density,
  leaving the minimum to recommend to every user
docstr_tok: ["This","method","is","responsible","to","filter","the","bi-groups","removing","the","ones","with","lower","density",",","leaving","the","minimum","to","recommend","to","every","user"]
code: def filter_relevant_bi_groups(self):
      """
      This method is responsible to filter the bi-groups removing the ones with lower density,
      leaving the minimum to recommend to every user
  
      """
  
      filtered_densities = self.density.copy()
      filtered_densities[filtered_densities == 1] = np.nan
  
      first_run = True
      old = filtered_densities.copy()
      while True:
          for line in filtered_densities:
              print(np.nansum(line))
              if np.nansum(line) == 0:
                  if first_run:
                      return np.logical_not(np.isnan(self.density))
                  else:
                      return np.logical_not(np.isnan(old))
  
          old = filtered_densities.copy()
  
          # replace min in filteredDensities value per nan
          index = np.nanargmin(filtered_densities)
          filtered_densities.flat[index] = np.nan
  
          first_run = False
  
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 10 for calling the PaCo obj's underlying member method code with example usage: obj.filter_relevant_bi_groups() and returns: np, np