Coder Social home page Coder Social logo

Comments (6)

LucaCappelletti94 avatar LucaCappelletti94 commented on May 24, 2024 1

What is your scipy and scikit-learn version? Have you already updated those?

The error seems to entirely stem from an incompatibility between those two packages. Please do let me know if simply running:

pip install scipy scikit-learn -U

resolves your issue.

from karateclub.

jackyzq avatar jackyzq commented on May 24, 2024

Here is the stacktrace

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-58-7ca8c8937511> in <module>
      1 import networkx as nx
----> 2 from karateclub import EgoNetSplitter

/opt/anaconda3/lib/python3.8/site-packages/karateclub/__init__.py in <module>
----> 1 from karateclub.community_detection import *
      2 from karateclub.node_embedding import *
      3 from karateclub.graph_embedding import *
      4 from karateclub.utils import *
      5 from karateclub.dataset import *

/opt/anaconda3/lib/python3.8/site-packages/karateclub/community_detection/__init__.py in <module>
----> 1 from .overlapping import *
      2 from .non_overlapping import *

/opt/anaconda3/lib/python3.8/site-packages/karateclub/community_detection/overlapping/__init__.py in <module>
----> 1 from .danmf import DANMF
      2 from .mnmf import MNMF
      3 from .ego_splitter import EgoNetSplitter
      4 from .nnsed import NNSED
      5 from .bigclam import BigClam

/opt/anaconda3/lib/python3.8/site-packages/karateclub/community_detection/overlapping/danmf.py in <module>
      2 import networkx as nx
      3 from typing import List, Dict
----> 4 from sklearn.decomposition import NMF
      5 from karateclub.estimator import Estimator
      6 

/opt/anaconda3/lib/python3.8/site-packages/sklearn/__init__.py in <module>
     80     from . import _distributor_init  # noqa: F401
     81     from . import __check_build  # noqa: F401
---> 82     from .base import clone
     83     from .utils._show_versions import show_versions
     84 

/opt/anaconda3/lib/python3.8/site-packages/sklearn/base.py in <module>
     15 from . import __version__
     16 from ._config import get_config
---> 17 from .utils import _IS_32BIT
     18 from .utils._set_output import _SetOutputMixin
     19 from .utils._tags import (

/opt/anaconda3/lib/python3.8/site-packages/sklearn/utils/__init__.py in <module>
     23 from .deprecation import deprecated
     24 from .discovery import all_estimators
---> 25 from .fixes import parse_version, threadpool_info
     26 from ._estimator_html_repr import estimator_html_repr
     27 from .validation import (

/opt/anaconda3/lib/python3.8/site-packages/sklearn/utils/fixes.py in <module>
     17 import numpy as np
     18 import scipy
---> 19 import scipy.stats
     20 import threadpoolctl
     21 

/opt/anaconda3/lib/python3.8/site-packages/scipy/stats/__init__.py in <module>
    483 from ._warnings_errors import (ConstantInputWarning, NearConstantInputWarning,
    484                                DegenerateDataWarning, FitError)
--> 485 from ._stats_py import *
    486 from ._variation import variation
    487 from .distributions import *

/opt/anaconda3/lib/python3.8/site-packages/scipy/stats/_stats_py.py in <module>
     39 from scipy.spatial.distance import cdist
     40 from scipy.ndimage import _measurements
---> 41 from scipy._lib._util import (check_random_state, MapWrapper,
     42                               rng_integers, _rename_parameter, _contains_nan)
     43 

from karateclub.

jackyzq avatar jackyzq commented on May 24, 2024

thanks that worked!

from karateclub.

LucaCappelletti94 avatar LucaCappelletti94 commented on May 24, 2024

Could you please let me know what were your scipy and scikit-learn versions and which ones do you have installed now?

from karateclub.

jackyzq avatar jackyzq commented on May 24, 2024

For other reasons, i did a fresh install of python, so I'm not too sure what my old versions were.

right now i'm using

Python 3.10.10
scipy 1.10.1
scikit-learn 1.2.2

from karateclub.

LucaCappelletti94 avatar LucaCappelletti94 commented on May 24, 2024

Ok, nevertheless great to know the version code where it works.

from karateclub.

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.