Given the indices of the closest centroid for each data point, you need to update the centroids by computing the average positions of the data points. What is the correct method to update the centroids?
1) Compute the mean of the data points assigned to each centroid
2) Compute the median of the data points assigned to each centroid
3) Compute the mode of the data points assigned to each centroid
4) Compute the maximum value of the data points assigned to each centroid