Closed
Description
I find the error message, raised when the number of features changes between calls to partial_fit in MiniBatchKMeans, a bit uninformative. See
from sklearn.cluster import MiniBatchKMeans
import numpy as np
X = np.random.random_sample((100,10))
mbk = MiniBatchKMeans()
mbk.partial_fit(X)
mbk.partial_fit(X[:,:-1])
>>> "ValueError: Incompatible dimension for X and Y matrices: X.shape[1] == 9 while Y.shape[1] == 10"
I understand that the error comes from a shape mismatch somewhere but it could be more informative (what is Y here ?), or am I just being too picky ?
Metadata
Metadata
Assignees
Labels
No labels