Given a distance matrix, with similarity between various professors :
prof1 prof2 prof3
prof1 0 0.8 0.9
prof2 0.8 0 0.2
prof3 0.9 0.2 0
I need to perform hierarchical clustering on this data, where the above data is in the form of 2-d matrix
data_matrix=[[0,0.8,0.9],[0.8,0,0.2],[0.9,0.2,0]]
I tried checking if I can implement it using sklearn.cluster AgglomerativeClustering but it is considering all the 3 rows as 3 separate vectors and not as a distance matrix. Can it be done using this or scipy.cluster.hierarchy?