pyspark 3.0 KMeansModel within set sum of squared errors

Viewed 1126

I'm trying to calculate the within set sum of squared errors by computeCost method but I get this error:

AttributeError: 'KMeansModel' object has no attribute 'computeCost'

I guess it is deprecated but I couldn't find a way to do it. I always get computeCost in my searches.

1 Answers

This problem is resolved by using model.summary.trainingCost instead of model.computeCost

Related