今天在运行多标签库的时候出现了下面的问题:
ImportError: cannot import name 'NetworkXLabelGraphClusterer
解决方法
from skmultilearn.cluster.networkx import NetworkXLabelGraphClusterer
还需要安装community的包:
pip install python-louvain
不然可能会出现错误:
ModuleNotFoundError: No module named 'community'
参考文献
[1].Cannot import 'NetworkXLabelGraphClusterer'. https://github.com/scikit-multilearn/scikit-multilearn/issues/154
[2].Louvain Community Detection. https://github.com/taynaud/python-louvain