qinyuenlp / communitydetection Goto Github PK
View Code? Open in Web Editor NEW复杂网络社区发现算法、评价指标、常用数据集整理
复杂网络社区发现算法、评价指标、常用数据集整理
求教
一些gml 无法读取,read_gml会报错:
networkx.exception.NetworkXError: node #0 has no 'label' attribute
power,netscience都会报错,这个怎么修改呢?
Traceback (most recent call last):
File "d:\OneDrive - Office365\complex network\projects\community_detection_2\demo_SpectralClustering.py", line 2, in <module>
from algorithm import SpectralClustering
File "d:\OneDrive - Office365\complex network\projects\community_detection_2\algorithm\SpectralClustering.py", line 22, in <module>
import numpy as np
File "D:\Applications\anacoda\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "D:\Applications\anacoda\lib\site-packages\numpy\core\__init__.py", line 54, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
1. Check that you expected to use Python3.7 from "D:\Applications\anacoda\python.exe",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.18.1" you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
我注意到_init_.py中是空的,但是commit comment说是修正了networkx版本不兼容的错误
运行GN算法的时候,出现如下报错
Traceback (most recent call last): File "<input>", line 1, in <module> File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Users/fanjunlei/PycharmProjects/CommunityDetection/demo_GN.py", line 12, in <module> gn_com = GN.partition(G_copy) File "/Users/fanjunlei/PycharmProjects/CommunityDetection/algorithm/GN.py", line 35, in partition modularities = [cm.modularity(results[i], G_copy) for i in range(len(results))] File "/Users/fanjunlei/PycharmProjects/CommunityDetection/algorithm/GN.py", line 35, in <listcomp> modularities = [cm.modularity(results[i], G_copy) for i in range(len(results))] AttributeError: module 'community' has no attribute 'modularity'
尝试换用networkx.algorithm.community还是不行
你好
请问下
com_dict = {node:com for node, com in zip(V, a)}
a 值得是什么?直接调试会报错
这个是哪个包呢 可以pip安装吗
ValueError: 'c' argument must be a color, a sequence of colors, or a sequence of numbers, not ([0, 1, 2, 3, 0, 3, 2, 0, 0, 0, 3, 4, 5, 2, 5, 2, 0, 6, 5, 7, 6, 0, 0, 0, 4, 1, 5, 6, 4, 7, 7, 5, 2, 1, 5, 7, 5, 1, 5, 2, 3, 0, 5, 5, 8, 1, 9, 2, 8, 9, 4, 0, 3, 9, 5, 7, 6, 8, 6, 6, 2, 5, 6, 6, 2, 6, 8, 9, 0, 4, 6, 5, 3, 9, 3, 8, 6, 0, 0, 7, 7, 3, 3, 9, 3, 5, 8, 6, 9, 1, 4, 8, 8, 0, 7, 6, 6, 6, 3, 5, 2, 7, 3, 1, 0, 1, 2, 3, 0, 1, 9, 0, 8, 6, 9], 0.5996290274077957)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.