We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98e5d15 commit 977fec1Copy full SHA for 977fec1
Chapter-6/document_clustering.py
@@ -180,7 +180,7 @@ def generate_random_color():
180
181
from sklearn.cluster import AffinityPropagation
182
183
-def affinty_propagation(feature_matrix):
+def affinity_propagation(feature_matrix):
184
185
sim = feature_matrix * feature_matrix.T
186
sim = sim.todense()
@@ -190,7 +190,7 @@ def affinty_propagation(feature_matrix):
190
return ap, clusters
191
192
# get clusters using affinity propagation
193
-ap_obj, clusters = affinty_propagation(feature_matrix=feature_matrix)
+ap_obj, clusters = affinity_propagation(feature_matrix=feature_matrix)
194
movie_data['Cluster'] = clusters
195
196
# get the total number of movies per cluster
0 commit comments