Scikit-learn: What does the MeanShift function return

259 Views Asked by At

I am trying to segment a colour image through using Mean-Shift clustering using sklearn.

For the following two lines of code:

ms = MeanShift(bandwidth=bandwidth, bin_seeding=True)
ms.fit(X)

I don't understand what the MeanShift function returns. In the scikit-learn documentation here, there is no description of what the function returns. What is the ms variable? Any insights are appreciated.

1

There are 1 best solutions below

0
Sıddık Açıl On

MeanShift is a class. You are creating an object. You are invoking its constructor method. This creates an instance of MeanShift on which you can perform fit, predict or fit_predict.

Refer to Python documentation.