third_party/blink/renderer/build/scripts/cluster.py
def calculate_error(k_means_matrix):
    """Calculate the sum of distance from each point to its nearest cluster center

    Args:
        k_means_matrix: distance matrix of point to cluster center

    Returns:
        Sum of distance from each point to its nearest cluster center
    """
    return sum([min(dist) for dist in k_means_matrix])
Calculate the sum of distance from each point to its nearest cluster center

    Args:
        k_means_matrix: distance matrix of point to cluster center

    Returns:
        Sum of distance from each point to its nearest cluster center
    
Calculate the sum of distance from each point to its nearest cluster center
Calculate the sum of distance from each point to its nearest cluster center
def calculate_error(k_means_matrix):
    return sum([min(dist) for dist in k_means_matrix])
def calculate_error ( k_means_matrix ) : return sum ( [ min ( dist ) for dist in k_means_matrix ] )
Calculate the sum of distance from each point to its nearest cluster center
Calculate the sum of distance from each point to its nearest cluster center
"""Calculate the sum of distance from each point to its nearest cluster center

    Args:
        k_means_matrix: distance matrix of point to cluster center

    Returns:
        Sum of distance from each point to its nearest cluster center
    """
Sum of distance from each point to its nearest cluster center
Sum of distance from each point to its nearest cluster center
k_means_matrix
distance matrix of point to cluster center
distance matrix of point to cluster center