@@ -0,0 +1,743 @@
+# -*- coding: utf-8 -*-%0A%22%22%22%0Aplots to anaylse the cluster structure (based on the distance martrix)%0A%22%22%22%0Aimport matplotlib%0Afrom matplotlib import pyplot as plt%0Aimport numpy as np%0Aimport pandas as pd%0A%0AZ = pd.read_csv(%0A    '/home/simnh/pf_results/' %5C%0A    'snapshot-clustering-results-k10-noDailyBounds/daily/Z.csv').values%0A%0Alast = Z%5B-200:, 2%5D%0Alast_rev = last%5B::-1%5D%0Aidxs = np.arange(1, len(last) + 1)%0Aplt.plot(idxs, last_rev)%0Aplt.show()%0A%0Aacceleration = np.diff(last, 2)  # 2nd derivative of the distances%0Aacceleration_rev = acceleration%5B::-1%5D%0Aplt.plot(idxs%5B:-2%5D + 1, acceleration_rev)%0Aplt.show()%0A# k = acceleration_rev.argmax() + 2  # if idx 0 is the max of this we want 2 clusters%0A# print(%22clusters:%22, k)%0A# dendrogram(Z, color_threshold=25)%0A#%0A#%0A#%0A

add plots drafts for distance matrix