Comments (3)
Hi Josh,
Thanks a lot for your answer.
You are right. My codes were long.
Now, I changed the code in the repository and now we have 5 lines of cods and a CSV which is the adjacency matrix.
You need just the python code (5 lines) and also the input CSV file to debug.
Please check the repository once again.
As I explained in the readme file, the ESRI Shapefiles are there just in case that somebody needs to visualize. But they are not necessary to debug. So, you can skip them.
About your question:
I have uploaded two pictures: clustering_output.jpeg which is the result of the algorithm and library. The other picture whose name is desired_output.jpeg is my favorite mood of clustering, but the algorithm doesn't provide such a result.
And I really don't know what is the problem that the library makes mistake. I hope you can help me improve the result and the repository is ready to debug and sorry for the inconvenience.
Thanks,
Mostafa
from k-means-constrained.
Hi Mostafa,
Thank you for the example. I wouldn’t consider the provided example a minimum workable example. Stackoverflow have a good article on how to produce this. Importantly the example should contain the least amount of code and data to reproduce the result you want to present. Ideally you should be able to paste it as few lines of code and include only a few datapoints of data within a GitHub comment.
I also don’t understand the problem? Why is the desired output not what you expected and why should the algorithm not give this output?
I know the above is more difficult to produce but it really helps me understand the issue. Otherwise it’s very hard for me to debug it 🙂
Thanks,
Josh
from k-means-constrained.
Hi Josh,
I think K-Means clustering generally is not the best method to cluster based on pre-computed matrix. It shows some inaccuracies even in the normal cases without constraint and without maximum cluster size limitation.
I believe AgglomerativeClustering is the best method to cluster based on pre-computed matrices. So, it is worth to try constraint methods on this clustering approach. I think the result will be much better than K-means.
Best regards,
Mostafa
from k-means-constrained.
Related Issues (20)
- [BUG] Incompatible with `ortools >= 9.4` (`No module named 'ortools.graph.pywrapgraph'`) HOT 9
- [BUG] installation issues with numpy < 1.23 HOT 3
- facing the issue during running HOT 2
- [BUG] Failed to build k-means-constrained HOT 3
- Wrong clustering HOT 1
- QGIS implementation HOT 1
- ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject HOT 2
- [How to classify the new instances after obtaining a constrained clustering] HOT 1
- [BUG] error compiling on apple silicon. HOT 2
- Maybe tag a new release? HOT 1
- Issue in importing k-means-constrained in Google Colab notebook HOT 2
- Possibility to use this on k-modes HOT 2
- Can't install k-means-constrained HOT 2
- Resource intensity HOT 2
- Weighting observations HOT 1
- import k_means_constrained HOT 4
- Issue with min cost flow input HOT 2
- Segmentation fault when import k_means_constrained
- Is it possible to implement MiniBatchKmeansConstrained?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k-means-constrained.