I have generated cost matrix from graph edit distance algorithm. Every entry (e.g 'TCGA-05-4420') corresponds to a specific graph.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
d = {'TCGA-05-4420': pd.Series([0, 907, 866, 839, 900, 827, 1616, 843, 855, 984], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-05-4430': pd.Series([928, 0, 347, 341, 437, 329, 1256, 343, 330, 531], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-44-4112': pd.Series([867, 357, 0, 203, 386, 196, 1195, 203, 242, 470], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-44-6778': pd.Series([841, 347, 211, 0, 353, 58, 1177, 77, 199, 437], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-49-AARQ': pd.Series([902, 441, 384,348, 0, 331, 1223, 347, 358, 503], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-55-6975': pd.Series([828, 329, 197, 58, 332, 0, 1162, 55, 178, 422], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-86-8278': pd.Series([1610, 1249, 1194, 1175, 1234, 1162, 0, 1179, 1188, 1287], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-97-A4M1': pd.Series([845, 347, 215, 81, 355, 55, 1178, 0, 195, 429], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-99-8033': pd.Series([857, 338, 227, 198, 363, 176, 1189, 192, 0, 459], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"]),
'TCGA-NJ-A4YP': pd.Series([975, 513, 468, 432, 503, 420, 1286, 435, 451, 0], index=["TCGA-05-4420", "TCGA-05-4430", "TCGA-44-4112", "TCGA-44-6778", "TCGA-49-AARQ",
"TCGA-55-6975", "TCGA-86-8278", "TCGA-97-A4M1", "TCGA-99-8033", "TCGA-NJ-A4YP"])}
df = pd.DataFrame(d)
print(df)
My ultimate goal is to cluster similar graphs together. However, since this is assymetrical cost matrix (do not confuse with distance matrix), I cannot apply any clustering method. I visualize this matrix with heat map, but its not informative to me. Here an example:

I would appreciate any useful suggestions on how to proceed with cost matrix.
Thank you!
Olha