Mercurial > repos > bimib > marea
comparison Marea/marea_cluster.py @ 40:2a082b4aed02 draft
Uploaded
author | bimib |
---|---|
date | Mon, 25 Nov 2019 12:03:55 -0500 |
parents | 2495c7772ca8 |
children | b3f9e13bf15f |
comparison
equal
deleted
inserted
replaced
39:56faa11c6c78 | 40:2a082b4aed02 |
---|---|
326 | 326 |
327 if not os.path.exists('clustering'): | 327 if not os.path.exists('clustering'): |
328 os.makedirs('clustering') | 328 os.makedirs('clustering') |
329 | 329 |
330 plt.figure(figsize=(10, 7)) | 330 plt.figure(figsize=(10, 7)) |
331 plt.title("Customer Dendograms") | 331 plt.title("Classes Dendogram") |
332 shc.dendrogram(shc.linkage(dataset, method='ward'), labels=dataset.index.values.tolist()) | 332 shc.dendrogram(shc.linkage(dataset, method='ward'), labels=dataset.index.values.tolist()) |
333 fig = plt.gcf() | 333 fig = plt.gcf() |
334 fig.savefig('clustering/dendogram.png', dpi=200) | 334 fig.savefig('clustering/dendogram.png', dpi=200) |
335 | 335 |
336 range_n_clusters = [i for i in range(k_min, k_max+1)] | 336 range_n_clusters = [i for i in range(k_min, k_max+1)] |