# How to interpret the sample_weight parameter in MiniBatchKMeans?

I am using scikit-learn MiniBatchKMeans to do text clustering.

In the fit() function there is a parameter sample_weight described as follows:

The weights for each observation in X. If None, all observations are assigned equal weight (default: None).

How should I interpret it exactly?

For instance, if I assigned greater weight to certain observations, will the centroid be nearer to that observations?

Yes, the parameter is available in the vanilla K-Means too.

The algorithm supports sample weights, which can be given by a parameter sample_weight. This allows assigning more weight to some samples when computing cluster centers and values of inertia. For example, assigning a weight of 2 to a sample is equivalent to adding a duplicate of that sample to the dataset X.

scikit-learn.org