def getSseKmeans(k_means, X):
    """
    Returns a list of sums of squared errors
    """
    import math
    sse = []
    for j in range(len(k_means.labels_)):
        c = k_means.labels_[j]
        ref = k_means.cluster_centers_[c]
        dist = []
        for k in range(len(ref)):
            dist.append(math.pow(X[j][k] - ref[k], 2))
        sse.append(dist)
    return sse
