Skip to content

Commit 977fec1

Browse files
committed
corrected function name for affinity prop
1 parent 98e5d15 commit 977fec1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Chapter-6/document_clustering.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def generate_random_color():
180180

181181
from sklearn.cluster import AffinityPropagation
182182

183-
def affinty_propagation(feature_matrix):
183+
def affinity_propagation(feature_matrix):
184184

185185
sim = feature_matrix * feature_matrix.T
186186
sim = sim.todense()
@@ -190,7 +190,7 @@ def affinty_propagation(feature_matrix):
190190
return ap, clusters
191191

192192
# get clusters using affinity propagation
193-
ap_obj, clusters = affinty_propagation(feature_matrix=feature_matrix)
193+
ap_obj, clusters = affinity_propagation(feature_matrix=feature_matrix)
194194
movie_data['Cluster'] = clusters
195195

196196
# get the total number of movies per cluster

0 commit comments

Comments
 (0)