Skip to content

A fast C implementation for spectral clustering utilizing various optimization techniques.

Notifications You must be signed in to change notification settings

ZuowenWang0000/FastSpectralClustering

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASL project: Spectral Clustering

Table of Contents

  1. Introduction
  2. Installation
  3. Commands

Introduction

This project implements the Spectral Clustering algorithm presented in the following paper: https://arxiv.org/abs/0711.0189. Refer to 18.pdf for detailed information and analysis.

6 clusters

Installation

On linux, run: ./requirements/install.sh

Python requirements

pip install -r requirements/python-requirements.txt

C requirements

linux

sudo apt-get install libeigen3-dev

The following are optional and only needed if you plan on using ARPACK or LAPACK

Optional: git clone https://github.com/xianyi/OpenBLAS.git, cd openblas, make

Optional: sudo apt-get install libopenblas-dev

Optional: sudo apt-get install $(cat requirements/apt-requirements.txt)

Optional: sudo apt-get install liblapacke-dev

macOS

brew install gcc-9 eigen

Optionally also follow the instructions in README-ARPACK if you plan on using ARPACK.

If you plan on using LAPACK

brew install openblas

Once requirements are installed

make init-spectra

Compile

Compile with make

Run
  • ./clustering <path/Dataset.txt> <# of clusters> <path/Output.txt>
  • e.g.:
  • ./clustering ./datasets/test_points/6_c.txt 6 out.txt
Visualization
  • interactive shell: python3 scripts/validation/validation.py
    • just specify names, input path is /datasets/test_points/, output is /output/validation/

To generate data sets (interactive):

  • generate_gaussian.py

About

A fast C implementation for spectral clustering utilizing various optimization techniques.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 72.2%
  • Python 24.1%
  • C++ 1.7%
  • Other 2.0%