def wss(lengths = nil)
      if lengths.nil?
        lengths = @lengths.map { |x| Array.new(x[1], x[0]) }.flatten
      end

      cluster_mean = mean
      ss = 0
      lengths.each do |len|
        ss += (cluster_mean - len) * (cluster_mean - len)
      end
      ss
    end
def wss(lengths = nil)
      if lengths.nil?
        lengths = @lengths.map { |x| Array.new(x[1], x[0]) }.flatten
      end

      cluster_mean = mean
      ss = 0
      lengths.each do |len|
        ss += (cluster_mean - len) * (cluster_mean - len)
      end
      ss
    end
Returns within cluster sum of squares