scikit-learn clustering: predict(X) vs. fit_predict(X)

In order to use the 'predict' you must use the 'fit' method first. So using 'fit()' and then 'predict()' is definitely the same as using 'fit_predict()'. However, one could benefit from using only 'fit()' in such cases where you need to know the initialization parameters of your models rather than if you use 'fit_predict()', where you will just be obtained the labeling results of running your model on the data.


fit_predict is usually used for unsupervised machine learning transductive estimator.

Basically, fit_predict(x) is equivalent to fit(x).predict(x).