Giter Site home page Giter Site logo

Comments (3)

mosikh avatar mosikh commented on May 20, 2024 2

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.

joshlk avatar joshlk commented on May 20, 2024

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.

mosikh avatar mosikh commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.