Coder Social home page Coder Social logo

subkmeans's Introduction

Fast Subspace Clustering

A GPU Implementation of subKMeans[1]

This is a CPU and GPU implementation of the KDD 2017 paper Towards an Optimal Subspace for K-Means[1]. The CPU implementation (mode=cpu) is written in Numpy. There are 2 GPU implementations:

  1. Using only PyCUDA and scikit-cuda API (mode=gpu)
  2. Using PyCUDA with custom kernels optimized for this algorithm (mode=gpu_custom)

Dependencies

  • Numpy
  • PyCUDA: pip install pycuda
  • scikit-cuda: Install from source as described here. We tested using commit #249538c.
  • Matplotlib (for plots)
  • scikit-learn (for computing NMI score)

Note: We tested this implementation only on Python 2. There are some issues with the GPU version on Python 3.

Usage

Go to src/

python main.py -d=<dataset_name> -k=<number_of_clusters> -mode=<mode>

For help: python main.py -h

3 available modes: cpu, gpu, gpu_custom

Example Usage

python main.py -d=wine -k=3 -mode=cpu

Sample Output
[i] Itr 1: 24 points changed
[i] Itr 2: 7 points changed
[i] Itr 3: 7 points changed
[i] Itr 4: 2 points changed
[i] Itr 5: 1 points changed
[i] Itr 6: 0 points changed

[i] Results
[*] m: 2
[*] NMI: 0.87590

References

[1] Mautz et. al. Towards an Optimal Subspace for K-Means

subkmeans's People

Contributors

abdulfatir avatar asiddharth avatar devamanyu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.