This repository contains the guide/code for generating the results from article "Power Spectral Clustering" paper.
Example1_TwoCircles.py
is used to generate the Figs. 2 and 3 in the paper. It compares Power Ratio Cut with Ratio cut on time/accuracy and robustness to noise on the toy example of two concentric circles.
run python Example1_TwoCircles.py
and results are saved in (./img/Example1/)
Example2_twoBlobs.py
contains the code to illustrate the use of Power Ratio cut on another toy example - Blobs data, and compare with the Normalized Cut.
run python Example2_twoBlobs.py
and results are saved in (./img/Example2/)
Example3a_flatzone.py
and Example3b_flatzone.py
are used to illustrate how PRcut behaves on flat zones. This is used to generate Figs. 4 and 5. in the article.
run python Example3a_flatzone.py
and results are saved in (./img/Example3/). Generates Fig 4 in the paper - typical case of clustering flat zones.
run python Example3b_flatzone.py
and results are saved in (./img/Example3/). Generates Fig 5 in the paper - typical case of clustering flat zones.
Example4_timing.py
is used to analyze the timing of PRcut vs Rcut on the blobs dataset. This code generates the Fig 6. in the article.
(Yet to be uploaded)
Download the dataset from here.
Example6_MNIST.py
is used to calculate the time/accuracy of PRcut vs Rcut and generate some typical results.
Example6_plotResults.py
is used to output the results calculated using Example6_MNIST.py
using Macbook Pro (2015) 15" model, 16 GB RAM and i7 processor. These results are taken from the file results_6_i7.csv
. Another set of results are stored in results_6_Xeon.csv
generated on 2010 intel xeon processor with 8 GB RAM.
Results from the above files are stored in (./img/)
(Yet to be Uploaded)
Files Example8a_hyperspectral.py
, Example8b_hyperspectral.py
and Example8c_hyperspectral.py
calculates the result of PRcut and Rcut on hyperspectral images of "University Pavia", "Pavia City" and "Salinas" datasets, which can be obtained from here.
Download the datasets and save them in (./Hyperspectral_data/) and then run the codes.
Example8_genetateGraphs.py
uses the saved results generated on 2010 intel xeon processor with 8 GB RAM, in results_8a.csv
, results_8b.csv
and results_8c.csv
.