Code Monkey home page Code Monkey logo

Comments (3)

vtraag avatar vtraag commented on May 26, 2024

Could you please provide a minimal reproducible example? Then we might be able to debug any problem. Without being able to replicate the problem, we also cannot solve it.

from networkanalysis.

gcasamat avatar gcasamat commented on May 26, 2024

You can find below some input and output txt files for replicating the issue.

The command I execute is:

java -cp /Applications/networkanalysis/networkanalysis-1.3.0.jar nl.cwts.networkanalysis.run.RunNetworkClustering
                      -n AssociationStrength -r 50 -m 50 --sorted-edge-list
                      -o net_clusters_res50.txt data_net.txt

The output message from networkanalysis is:

Quality function: CPM
Normalization method: AssociationStrength
Resolution parameter: 50.0
Minimum cluster size: 50
Number of random starts: 1
Number of iterations: 10
Randomness parameter: 0.01
Random number generator seed: random
Running algorithm took 0s.
Quality function equals 0.9256850092525903.
Clustering consists of 1354 clusters.
Removing clusters consisting of fewer than 50 nodes.
Final clustering consists of 1353 clusters.

However, I count 1018 clusters in the file net_clusters_res50.txt, with many clusters less than 50 items.

Thanks for your help.

data_net.txt
net_clusters_res50.txt

from networkanalysis.

vtraag avatar vtraag commented on May 26, 2024

There are two separate issues here:

  1. Communities are not consecutively numbered.
  2. Clusters may have less nodes than indicated by the threshold.

The first item should be solved, I've opened a PR in #27 for this.

The second item cannot be solved in this case. That is, your network contains several components (1006, to be precise). The algorithm will never create clusters larger than the individual components. This will not be changed.

It might be a possibility to check connected components and provide a warning if the connected components are smaller than the minimum desired community size. However, this also means that more time is spent in checking this, so there should at least be an option to turn it off. What do you think @neesjanvaneck ?

from networkanalysis.

Related Issues (13)

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.