class_docstr: Assesses the quality of partitioning according to chosen metrics and report it.
  
  Available metrics: edge cut, edge imbalance, vertex imbalance, time, memory usage.
  
  Parameters
  ----------
  partitionings:
          Data splits to be compared.
  
  Example
  -------
  
  >>>>quality = PartitioningReporter(partitionings)
  >>>>report = quality.report(visualize=False)
class_docstr_tok: ["Assesses","the","quality","of","partitioning","according","to","chosen","metrics","and","report","it",".","Available","metrics",":","edge","cut",",","edge","imbalance",",","vertex","imbalance",",","time",",","memory","usage",".","Parameters","--","--","--","--","--","partitionings",":","Data","splits","to","be","compared",".","Example","--","--","--","-",">",">",">",">","quality","=","PartitioningReporter","(","partitionings",")",">",">",">",">","report","=","quality.report","(","visualize=False",")"]
docstr: Calculates vertex imbalance of partitions, vertex count - counts number
     of vertices in each partition that estimates the size of partition.
  
  
  Parameters
  ----------
  partitions:
      Partitions in one partitioning.
  
  Returns
  -------
  vertex_imb: float
      Vertex imbalance.
  vertex_count: list
      List of counts, e.g., for 2 partitions the list will be of size two with vertex count for each
      partition: (5,6), for 3 partitions: (5,2,4).
docstr_tok: ["Calculates","vertex","imbalance","of","partitions",",","vertex","count","-","counts","number","of","vertices","in","each","partition","that","estimates","the","size","of","partition",".","Parameters","--","--","--","--","--","partitions",":","Partitions","in","one","partitioning",".","Returns","--","--","--","-","vertex_imb",":","float","Vertex","imbalance",".","vertex_count",":","list","List","of","counts",",","e.g.",",","for","2","partitions","the","list","will","be","of","size","two","with","vertex","count","for","each","partition",":","(","5,6",")",",","for","3","partitions",":","(","5,2,4",")","."]
code: def get_vertex_imbalance_and_count(
      self, partitions, vertex_count=False
  ):
      """Calculates vertex imbalance of partitions, vertex count - counts number
         of vertices in each partition that estimates the size of partition.
  
  
      Parameters
      ----------
      partitions:
          Partitions in one partitioning.
  
      Returns
      -------
      vertex_imb: float
          Vertex imbalance.
      vertex_count: list
          List of counts, e.g., for 2 partitions the list will be of size two with vertex count for each
          partition: (5,6), for 3 partitions: (5,2,4).
      """
      lengths = []
      for partition in partitions:
          ents_len = partition.backend.mapper.get_entities_count()
          lengths.append(ents_len)
  
      vertex_imb = np.max(lengths) / np.mean(lengths) - 1
      if vertex_count:
          return vertex_imb, lengths
      else:
          return vertex_imb
  
file_path: AmpliGraph/ampligraph/datasets/partitioning_reporter.py
imports: import copy
  import logging
  import matplotlib.pyplot
  import numpy
  from matplotlib.pyplot import cm
  from .datasets import load_fb15k_237
  from .graph_partitioner import RandomVerticesGraphPartitioner
label_desc: Use image node_id 4 for calling the PartitioningReporter obj's underlying member method code with example usage: obj.get_vertex_imbalance_and_count(partitions, vertex_count) and returns: vertex_imb,  lengths, vertex_imb