What is the significance of max_iter in sklearn.cluster.MiniBatchKMeans? Is this the maximum number of times partial_fit() can be executed on batches of data?

  • $\begingroup$ I think when we train MiniBatchKMeans model using partial_fit() in incremental manner, max_iter doesn't really have any significance. $\endgroup$ – NewDev Jul 8 '20 at 3:06

max_iterint, default=100
Maximum number of iterations over the complete dataset before stopping independently of any early stopping criterion heuristics.

It's the number of iteration over the full dataset.

Number of partial_fit will depend on batch_size

batch_sizeint, default=100
Size of the mini batches.

partial_fit(self, X[, y, sample_weight])
Update k means estimate on a single mini-batch X.

Ref :
User guide
Class Def.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.