in DownstreamEval/clustering/metric.py [0:0]
def show(self,width=6,row_labels=None,column_labels=None):
print("Confusion Matrix:")
conf = self.conf
rows = self.gt_n_cluster or conf.size(0)
cols = conf.size(1)
if column_labels is not None:
print(("%" + str(width) + "s") % '', end='')
for c in column_labels:
print(("%" + str(width) + "s") % c, end='')
print('')
for i in range(0,rows):
if row_labels is not None:
print(("%" + str(width) + "s|") % row_labels[i], end='')
for j in range(0,cols):
print(("%"+str(width)+".d")%conf[i,j],end='')
print('')