From 0b56fe9d8ee93b9f90d95443df7a458cc2148349 Mon Sep 17 00:00:00 2001 From: Sank Date: Tue, 1 Jun 2021 14:50:05 +0600 Subject: [PATCH] change as_matrix() values as_matrix() deprecated --- code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code.py b/code.py index 04c7cad..44bd89d 100644 --- a/code.py +++ b/code.py @@ -25,7 +25,7 @@ def set_colors(labels, colors=colors_options): DataFrame = pd.read_csv('Project2_dataset.csv', header=None) -DataMatrix = DataFrame.as_matrix() +DataMatrix = DataFrame.values normalized_data_matrix = skp.scale(DataMatrix, axis=0) @@ -116,4 +116,4 @@ def set_colors(labels, colors=colors_options): ax.scatter(*centroid, c='k', s=150, marker='X') plt.title('Subtractive and K-means clusters') ax.legend() -plt.show() \ No newline at end of file +plt.show()