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 4d4e695 commit 20b3c68Copy full SHA for 20b3c68
python/pyspark/mllib/clustering.py
@@ -110,7 +110,7 @@ def computeCost(self, rdd):
110
"""Return the K-means cost (sum of squared distances of points to their nearest center) for this
111
model on the given data."""
112
cost = callMLlibFunc("computeCostKmeansModel", rdd.map(_convert_to_vector),
113
- map(_convert_to_vector, self.centers))
+ [_convert_to_vector(c) for c in self.centers])
114
return cost
115
116
def save(self, sc, path):
0 commit comments