Coder Social home page Coder Social logo

kmm-python's Introduction

KMM-Python

COMP 5331 group project

Reference: Paper , Matlab code

Prerequisite

  • OS: Linux & Mac OS(tested)

  • Python 3.7.4

  • pipenv

Setup

cd <work-dir>
git clone https://github.com/SimonZYC/KMM-Python.git
cd KMM-Python

pipenv install

Run

Toy Sample (For demonstration)

cd <Path-to-KMM>
./bin/test.sh toy

Test All (very slow)

cd <Path-to-KMM>
./bin/test.sh all

Custom

cd <Path-to-KMM>

pipenv run python bin/test_kmm.py -d data/overlap/s4.data -g data/overlap/s4.ground

Source Code Description

KMM-Python

  • bin:
    • test.sh, test_KMM.py: test scripts
    • batchPlot.py: create a figure of the results
    • batchRun.py: execute serveral clustering algorithms together

โ€‹

  • KMM: KMM code directory:

    • KMM.py: main function, control the iteration process.
    • csbg.py: Solve the optimization problemm
    • ConstructA_NP.py: create sparse matrix of distance between points
    • gen_nn_distanceA.py: calculate distance between points
    • sqdist.py: computes a rectangular matrix of pairwise distance between points in A (given in columns) and points in B
    • SVD2UV.py: transformation
  • other: Implementaion of k-means, kernel-k-means, spectral:

    • k_means.py: the code of k-means algorithm
    • kernel_k_means.py: the code of kernel k-means algorithm
    • spectral.py: the code of spectral clustering algorithm
  • utils: some tool functions

    • affinity.py: the affinity function and pruning function used in the spectral clustering algorithm
    • analysis.py:
    • kernels.py: the kernel functions used in the kernel k-means algorithm
    • LoadData.py: the functions used to load data points and related labels
    • utils.py: the functions used to calculate NMI, purity and distance

โ€‹

kmm-python's People

Contributors

wuvei avatar

Watchers

 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.