Closed
Description
Description
in sklearn/cluster/k_means_.py
, line 1559:
scikit-learn/sklearn/cluster/k_means_.py
Lines 1559 to 1563 in 2e2e69d
Are variables batch_inertia
and centers_squared_diff
actually used before being reassigned in line 1589?
scikit-learn/sklearn/cluster/k_means_.py
Lines 1583 to 1603 in 2e2e69d
I presume that if n_iter
is 0, then the for loop at line 1583 will not be run, which makes the assignment useful. But for k-means is n_iter
ever set to 0?
Note
I found this through lgtm.com, as recommended by #12167
Versions
0.20
Metadata
Metadata
Assignees
Labels
No labels