There is an error in the documentation that shadows a previous error in the KMeans documentation: specifically, it states that the relative tolerance is with respect to the inertia, when in fact it is with respect to the norm of the change in centroid positions.
Hi, thanks for the heads up 😃 . I have updated the documentation to reflectx this. It has been updated online but I haven't done another release yet.
There is an error in the documentation that shadows a previous error in the KMeans documentation: specifically, it states that the relative tolerance is with respect to the inertia, when in fact it is with respect to the norm of the change in centroid positions.
See: https://github.com/scikit-learn/scikit-learn/issues/16058
Incidentally, it might be helpful when outputting data when verbose=True to include the current norm at each iteration. For example:
Iteration 51, inertia 497.000
would become:
Iteration 51, inertia 497.000, centre-shift 0.01425.
That being said sklearn doesn't do that so for the sake of compatibility, probably best not to.