Coder Social home page Coder Social logo

zb116 / k-means-u-star Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gittar/k-means-u-star

0.0 0.0 0.0 27.3 MB

implementation of the k-means-u* clustering algorithm

Home Page: https://arxiv.org/abs/1706.09059

Jupyter Notebook 99.35% Python 0.65%

k-means-u-star's Introduction

The k-means-u* algorithm

non-local jumps and greedy retries improve k-means++ clustering

GitHub Logo

This repository contains example python code for the k-means-u and k-mean-u* algorithms as proposed in https://arxiv.org/abs/1706.09059.

Quick Start

  • clone repository: git clone https://github.com/gittar/k-means-u-star
  • cd main directory: cd k-means-u-star
  • install miniconda or anaconda: https://conda.io/docs/install/quick.html
  • create kmus environment: conda env create -f envsimple.yml
  • activate environment: source activate kmus (on windows: activate kmus)
  • start one of the jupyter notebooks, e.g.: jupyter notebook notebooks/algo-pure.ipynb
  • continue in the browser window which opens (jupyter manual: http://jupyter-notebook.readthedocs.io/en/latest/)

jupyter notebooks:

  • algo-pure.ipynb
    a bare-bones implementation meant for easy understanding of the algorithms
  • simu-detail.ipynb
    detailed simulations and graphics to illustrate the way the algorithms work, uses kmeansu.py
  • simu-bulk.ipynb
    systematic simulations with various data sets to compare k-means-++, k-means-u and k-means-u*, uses kmeansu.py
  • dataset_class.ipynb
    examples for using the data generator

python files:

  • kmeansu.py
    main implementation of k-means-u and k-means-u*, makes heavy use of http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html for efficient implementations of k-means and k-means++, gathers certain statistics while training to enable systematic evaluation, code therefore a bit larger
  • bfdataset.py
    contains a class "dataset" to generate test data sets and also an own implementation of k-means++ which allows to access the codebook after initialization but before the run of k-means
  • bfutil.py
    various utility functions for plotting etc.

k-means-u-star's People

Contributors

gittar 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.