Commit 55bcf758f37969188cf737d1a6ff23fe803ebddd

Authored by quillotm
1 parent 8df8f5b238
Exists in master

By default, kmeans mahalanobis is with constrains

Showing 1 changed file with 0 additions and 6 deletions Side-by-side Diff

volia/clustering_modules/kmeans_mahalanobis.py
... ... @@ -96,16 +96,10 @@
96 96 fig = plt.figure()
97 97 ax = fig.add_subplot(111)
98 98 scatter = ax.scatter(points[:, 0], points[:, 1], c=clusters, s=50)
99   -
100   - #for center in centers:
101   - # ax.scatter(center[0], center[1], s=50, c='red', marker='+')
102 99 ax.scatter(centers[:, 0], centers[:, 1], s=50, c='red', marker='+')
103   -
104 100 ax.set_xlabel('x')
105 101 ax.set_ylabel('y')
106 102 plt.colorbar(scatter)
107   - #plt.ylim(0, 1)
108   - #plt.xlim(0, 1)
109 103 plt.savefig("test_" + str(iteration) + ".pdf")
110 104  
111 105 def _train(self, features, K: int, tol: float, maxiter: int, debug: bool=False):