Git Product home page Git Product logo

Comments (5)

btel avatar btel commented on July 27, 2024

Older versions of scikits learn use scikits.learn namespace. We should import whichever the user has installed.

from spikesort.

belevtsoff avatar belevtsoff commented on July 27, 2024

I haven't found yet where the problem is originated, but I have two test fail now, namely:

======================================================================
ERROR: test gmm clustering algorithm
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/dmytro/work/SpikeSort/tests/test_core.py", line 313, in test_gmm
    cl = ss.cluster.cluster('gmm', self.features, self.K)
  File "/home/dmytro/work/SpikeSort/src/spike_sort/core/cluster.py", line 166, in cluster
    labels = cluster_func(data, *args, **kwargs)
  File "/home/dmytro/work/SpikeSort/src/spike_sort/core/cluster.py", line 10, in foo
    "scikits.learn must be installed to use %s" % method)
NotImplementedError: scikits.learn must be installed to use gmm

======================================================================
ERROR: test scikits k-means plus algorithm
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/dmytro/work/SpikeSort/tests/test_core.py", line 307, in test_k_means_plus
    cl = ss.cluster.cluster('k_means_plus', self.features, self.K)
  File "/home/dmytro/work/SpikeSort/src/spike_sort/core/cluster.py", line 166, in cluster
    labels = cluster_func(data, *args, **kwargs)
  File "/home/dmytro/work/SpikeSort/src/spike_sort/core/cluster.py", line 10, in foo
    "scikits.learn must be installed to use %s" % method)
NotImplementedError: scikits.learn must be installed to use k_means_plus

----------------------------------------------------------------------

I have scikits.learn 0.8.1 installed.

from spikesort.

btel avatar btel commented on July 27, 2024

That is the problem with namespaces. Your scikits.learn probably uses the old scikits.learn namespace and not sklearn

from spikesort.

belevtsoff avatar belevtsoff commented on July 27, 2024

I reopened the issue but it's still has the "Closed" status :\

Anyway, I guess this code should have accounted for the old name, but apparently it doesn't work this way:

try:
    import scikits.learn as sklearn
except ImportError:
    pass

from sklearn import cluster as skcluster
from sklearn import mixture

from spikesort.

belevtsoff avatar belevtsoff commented on July 27, 2024

replaced with slightly uglier but working import

from spikesort.

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.