Skip to content

(H)DBSCAN #158

Open
Open

Activity

  1. lmcinnes commented on Apr 10, 2018

    @lmcinnes

    I believe an approximate version of this is parallelizable. Some of the relevant techniques are described in this paper: http://www.sysml.cc/doc/105.pdf

    This is certainly of interest to me -- I had been planning something similar before the paper came out, and had already coded up a python version of NNDescent. That version is not parallel, but making it so would be interesting to try. One catch that comes to mind is that that implementation is currently using Numba instead of Cython for performance. Did the maintainers here have any strong feelings on Numba dependencies?

  2. TomAugspurger commented on Apr 11, 2018

    @TomAugspurger
    MemberAuthor

    Great!

    I’m happy to accept numba as a dependency (I have a branch moving our Cython k-means to numba. Using just numba would simplify our build and release process. )

  3. lmcinnes commented on Apr 11, 2018

    @lmcinnes

    I'll see what I can put together then. I can't make any promises on getting it done soon, but I will definitely put it in the queue of things to work on.

  4. TomAugspurger commented on Apr 11, 2018

    @TomAugspurger
    MemberAuthor

    Skimming the paper at http://www.sysml.cc/doc/105.pdf

    https://github.com/lmcinnes/pynndescent would be great to make dask-friendly and include in dask-ml. If possible I'd like to re-use it for a top-level KNeighborsClassfier/Regressor API, and inside SpectralClustering (as an alternative to K-Means).

  5. added
    Algorithm
    on Jun 29, 2018
  6. mrocklin commented on Jul 15, 2018

    @mrocklin
    Member

    I chatted with @lmcinnes about this. It seems like this is slightly blocked on improved slicing of dask arrays with out-of-order indices. For example the following was inefficient

    In [1]: import dask.array as da
    
    In [2]: x = da.random.random((1000000, 100), chunks=(10000, 100))
    
    In [3]: import numpy as np
    
    In [4]: index = np.arange(len(x))
    
    In [5]: np.random.shuffle(index)
    
    In [6]: %time y = x[index]
    /home/mrocklin/Software/anaconda/bin/ipython:1: PerformanceWarning: Slicing with an out-of-order index is generating 9900 times more chunks
      #!/home/mrocklin/Software/anaconda/bin/python
    CPU times: user 4.48 s, sys: 188 ms, total: 4.67 s
    Wall time: 4.68 s
    
    In [7]: y.numblocks
    Out[7]: (989999, 1)
  7. jakirkham commented on Jul 15, 2018

    @jakirkham
    Member

    So would solving issue ( dask/dask#3409 ) address this?

  8. mrocklin commented on Jul 15, 2018

    @mrocklin
    Member
  9. mrocklin commented on Jul 15, 2018

    @mrocklin
    Member

    Although it may also be that we can improve things today if we index directly many times, but make sure that the index is sorted.

    In [1]: import dask.array as da
    
    In [2]: x = da.random.random((1000000, 100), chunks=(10000, 100))
    
    In [3]: import numpy as np
    
    In [4]: index = np.random.randint(0, len(x), size=10000)
    
    In [5]: %time x[index].numblocks
    /home/mrocklin/Software/anaconda/bin/ipython:1: PerformanceWarning: Slicing with an out-of-order index is generating 100 times more chunks
      #!/home/mrocklin/Software/anaconda/bin/python
    CPU times: user 73.6 ms, sys: 3.8 ms, total: 77.4 ms
    Wall time: 76.8 ms
    Out[5]: (9907, 1)
    
    In [6]: index.sort()
    
    In [7]: %time x[index].numblocks
    CPU times: user 4.74 ms, sys: 47 µs, total: 4.78 ms
    Wall time: 4.15 ms
    Out[7]: (100, 1)
  10. mrocklin commented on Jul 17, 2018

    @mrocklin
    Member

    I've laid out a plan in dask/dask#3409 (comment) to improve things a bit. That should be accessible for others to contribute if they're interested.

  11. TomAugspurger commented on Aug 29, 2018

    @TomAugspurger
    MemberAuthor

    We've started to make progress on this on the Dask side: (dask/dask#3808 for slicing performance with as shuffled array).

    @lmcinnes do you have a rough sketch of the next steps for a parallel / distributed pynndescent? On a brief examination, the random projections would be the first thing? I'm interested in working on this a bit.

  12. added
    Roadmap
    on Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AlgorithmRoadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions