Skip to main content

Generalized Spectral Clustering in Python

Project description

This is a package for performing Spectral Clustering.

It works a near-fully unsupervised way : the only required information is the number of clusters .

The clustering is done using the Generalized Spectral Clustering (GSC) framework developped by Jonckheere et al. in arXiv:2203.03221. It has been shown experimentally that this framework regularly outperforms classical spectral clustering for synthetic and real datasets.

Classical spectral clustering can also be performed by tweaking the parameters, as the clustering algorithm used is fully customizable.

Interacting with the package is done trough the GSC class, representing a GSC model. To use :

  • Create a GSC object with the parameters of your choice
  • Cluster your data using the fit method of the class
  • Retrieve the clustering using the labels attribute
  • Get more information on the clustering by using the available instance attributes (cluster centers, eigenvalues of the graph laplacian, adjacency matrix, Calinski-Harabasz index)
  • Evaluate the performance of the clustering using the nmi method.

To help you manage your datasets, GSCpy includes a file manager allowing to easily load and save datasets with their labels.The package also includes an interactive 2D dataset builder, powered by matplotlib.

GSCpy is entirely written in Python and requires the following libraries to run correctly :

  • NumPy
  • Matplotlib
  • SciPy
  • Scikit-learn

This project was carried out as part of an internship at LAAS-CNRS, Toulouse.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gscpy-0.1.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GSCpy-0.1.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file gscpy-0.1.1.tar.gz.

File metadata

  • Download URL: gscpy-0.1.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for gscpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 92ee3d0e9e18df5df3d994df156be7e720dd327fa6e789e260f5ef137e3ea9e3
MD5 6c70e9b7738d4f99a1050fbdb82debdb
BLAKE2b-256 e42ade40af7a5c7d0c18649f4502c50f49d88ee224c9be73bbd30288b7335bf6

See more details on using hashes here.

File details

Details for the file GSCpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: GSCpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for GSCpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 121f305b08ba928b76f6f30a4e746b5808d22bbc56d968a703546787434815dc
MD5 2a789acf822aa6a04eb4efad9a0b628d
BLAKE2b-256 dd9271833edeac0e38047ee78de1b7596832e05ebf1d380e3e42adf0e4cdb0a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page