You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to fit the k-means-constrained on training samples and then call it to predict test samples. I am getting the following error message:
~\anaconda3\lib\site-packages\k_means_constrained\k_means_constrained_.py in predict(self, X, size_min, size_max)
708 raise ValueError("size_max must be larger than size_min")
709 if size_min * n_clusters > n_samples:
--> 710 raise ValueError("The product of size_min and n_clusters cannot exceed the number of samples (X)")
711
712 labels, inertia = \
ValueError: The product of size_min and n_clusters cannot exceed the number of samples (X)
It seems there is not enough data in the testing sample to meet the clusters size constraints (here size_min) but is there a way to only apply the clusters sizes constrains in the fitting process and not in the prediction one?
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to fit the k-means-constrained on training samples and then call it to predict test samples. I am getting the following error message:
~\anaconda3\lib\site-packages\k_means_constrained\k_means_constrained_.py in predict(self, X, size_min, size_max)
708 raise ValueError("size_max must be larger than size_min")
709 if size_min * n_clusters > n_samples:
--> 710 raise ValueError("The product of size_min and n_clusters cannot exceed the number of samples (X)")
711
712 labels, inertia = \
ValueError: The product of size_min and n_clusters cannot exceed the number of samples (X)
It seems there is not enough data in the testing sample to meet the clusters size constraints (here size_min) but is there a way to only apply the clusters sizes constrains in the fitting process and not in the prediction one?
The text was updated successfully, but these errors were encountered: