Skip to content

Latest commit

 

History

History
executable file
·
84 lines (43 loc) · 1.68 KB

README.md

File metadata and controls

executable file
·
84 lines (43 loc) · 1.68 KB

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