public double calcKMeansCosts ( double [ ] center , ClusteringFeature points ) { assert ( this . sumPoints . length == center . length && this . sumPoints . length == points . sumPoints . length ) ; return ( this . sumSquaredLength + points . sumSquaredLength ) - 2 * Metric . dotProductWithAddition ( this . sumPoints , points . sumPoints , center ) + ( this . numPoints + points . numPoints ) * Metric . dotProduct ( center ) ; }
Calculates the k - means costs of the ClusteringFeature and another ClusteringFeature too a center .