The Star Clustering algorithm is a clustering technique that is loosely inspired and analogous to the process of star system formation. Its purpose is as an alternative clustering algorithm that does not require knowing the number of clusters in advance or any hyperparameter tuning.
The following dependencies should be installed:
- numpy
It is recommended that you have Scikit-Learn as the implementation provided here is meant to work with Scikit-Learn as a drop in replacement for other algorithms.
The actual algorithm is located in star_clustering.py and can be called by the import statement:
from star_clustering import StarCluster
Then create an object to instantiate an instance of the algorithm:
star = StarCluster()
Then call the fit or predict functions as you would any other clustering algorithm in Scikit-Learn.
Three test scripts are provided that are meant to show the effectiveness of the algorithm on very different types of data.
- plot_cluster_comparison.py
- word_vectors_test.py
- plot_cluster_iris.py
Note that the word vectors test requires a copy of the FastText pretrained word vectors or some equivalent, which is not provided here.
Apache 2.0