Giter Club home page Giter Club logo

Comments (2)

saibalmars avatar saibalmars commented on May 24, 2024

Solved in 0e67e51

Thanks for the info.

from graphriccicurvature.

pollytur avatar pollytur commented on May 24, 2024

I still face the same issue (installation from scratch on Colab with both pip and git clone gives the same error )

orc = OllivierRicci(G, alpha=0.5, verbose="INFO")
orc.ricci_community()

Traceback

INFO:GraphRicciCurvature:Ricci flow not detected yet, run Ricci flow with default setting first...
INFO:GraphRicciCurvature:No ricciCurvature detected, compute original_RC...
INFO:GraphRicciCurvature:0.258078 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 0 === 
INFO:GraphRicciCurvature:0.335991 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 1 === 
INFO:GraphRicciCurvature:0.604810 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 2 === 
INFO:GraphRicciCurvature:0.650828 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 3 === 
INFO:GraphRicciCurvature:0.727168 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 4 === 
INFO:GraphRicciCurvature:0.528388 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 5 === 
INFO:GraphRicciCurvature:0.370375 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 6 === 
INFO:GraphRicciCurvature:0.247215 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 7 === 
INFO:GraphRicciCurvature:0.199036 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 8 === 
INFO:GraphRicciCurvature:0.204243 secs for Ricci curvature computation.
INFO:GraphRicciCurvature: === Ricci flow iteration 9 === 
INFO:GraphRicciCurvature:0.269540 secs for Ricci curvature computation.
INFO:GraphRicciCurvature:4.716530 secs for Ricci flow computation.
INFO:GraphRicciCurvature:Ricci flow detected, start cutting graph into community...
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-39-bb6b5f15049b>](https://msl7zy2js3-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230718-060202-RC00_548938380#) in <cell line: 1>()
----> 1 orc.ricci_community()

2 frames
[/usr/local/lib/python3.10/dist-packages/GraphRicciCurvature/OllivierRicci.py](https://msl7zy2js3-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230718-060202-RC00_548938380#) in ricci_community(self, cutoff_step, drop_threshold)
    838         """
    839 
--> 840         cc = self.ricci_community_all_possible_clusterings(cutoff_step=cutoff_step, drop_threshold=drop_threshold)
    841         assert cc, "No clustering found!"
    842 

[/usr/local/lib/python3.10/dist-packages/GraphRicciCurvature/OllivierRicci.py](https://msl7zy2js3-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230718-060202-RC00_548938380#) in ricci_community_all_possible_clusterings(self, cutoff_step, drop_threshold)
    882         logger.info("Ricci flow detected, start cutting graph into community...")
    883         cut_guesses = \
--> 884             get_rf_metric_cutoff(self.G, weight=self.weight, cutoff_step=cutoff_step, drop_threshold=drop_threshold)
    885         assert cut_guesses, "No cutoff point found!"
    886 

[/usr/local/lib/python3.10/dist-packages/GraphRicciCurvature/util.py](https://msl7zy2js3-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230718-060202-RC00_548938380#) in get_rf_metric_cutoff(G_origin, weight, cutoff_step, drop_threshold)
     96         clustering = {c: idx for idx, comp in enumerate(nx.connected_components(G)) for c in comp}
     97         # Compute modularity
---> 98         modularity.append(community_louvain.modularity(clustering, G, weight))
     99 
    100     good_cuts = []

AttributeError: module 'community' has no attribute 'modularity'

from graphriccicurvature.

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.