-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with max size of clusters #8
Comments
Hi, Great to hear that your using it 😀. Can you please provide a minimal working example. Thanks, Josh |
Longitude Latitude this is my data, I normalized it with minmax scaler. and used this function in order to clustering : def k_means_cons(k,minVal,maxVal,data):
Label = k_means_cons(10,3,5,normalized) and it returns me: array([0, 9, 7, 1, 9, 8, 5, 5, 1, 4, 8, 3, 1, 4, 5, 4, 0, 4, 6, 5, 8, 5, as you can see there are 6 elements in 4th cluster |
Thanks. What exact normalisation did you use? what sklearn and ortools version are you also using? |
sklearn version is 0.23.2 and ortools version is 8.1.8487 |
i think, I made it complex. Briefly if you run the code below, sometimes it gives you cluster with more than max_size
array([7, 9, 6, 0, 1, 0, 1, 3, 0, 5, 2, 5, 7, 2, 4, 0, 3, 5, 4, 8, 7, 0, |
Hi, I determined what the issue is and it's my fault as the example on the front page of this project is wrong. So thank you for raising the issue. So you need to use the method Currently, I would say, the Thanks again for reporting this, |
Hi, I used Thanks for your quick response. |
Hi
Thank you for sharing your code! I used it to cluster my data in 10 cluster with min_size = 3 and max_size = 5. But it returns some clusters with more than max size elements unfortunately. it gives me a cluster with 7 elements sometimes.
The text was updated successfully, but these errors were encountered: