Closed seyeeet closed 2 years ago
Hello,
Thanks for the reach out.
Do you mean the dendrogram in Fig. 9?
yes, that is what I am talking about :)
from scipy.cluster import hierarchy
import matplotlib.pyplot as plt
Z = hierarchy.linkage(conf_matrix, 'complete')
fig = plt.figure(figsize=(12, 4))
def llf(id):
return labels[id]
dendro = hierarchy.dendrogram(Z, leaf_label_func=llf, leaf_rotation=0, leaf_font_size=8, orientation='top',
link_color_func=lambda k: 'black')
Something like this: where conf_matrix
is an N x N (number of classes) similarity matrix (I used cosine similarity to measure the distance), and labels=['label_1', ...]
is a list consisted of N semantic class labels.
thank you very much!
Hello,
Thank you very much for this interesting work. Can you please let me know how I can compute the decision boundary as you show in the last page of the paper ?