data-science-from-scratch
data-science-from-scratch copied to clipboard
Code in Chapter 20 Clustering has redundant line #57
Hello,
The code in Chapter 20 Clustering has redundant line 57 https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/clustering.py
self.means = cluster_means(self.k, inputs, assignments)
This line is repeated with line 47 and can be deleted. Thanks
@danli349 If you look closely, it's not repeated, as assignments
is reassigned in line 56.
@KianYang-Lee I know the assignments
changed, but this line is not necessary and can be deleted without changing anything.