Skip to content

lijiaqi/spherical-scikit-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spherical-Scikit-Learn: a toolkit for spherical k-means and spherical von Mises-Fisher mixture model.

Short Introduction

This package was unintentionally built when I explored a problem about spherical clustering. Compared to some existing packages spherecluster, this toolkit was implemented with Cython-like basic operators similar to scikit-learn. The APIs are scikit-learn-like and the documentation can be found at https://lijiaqi.github.io/spherical-scikit-learn/.

Currently, this package supports:

  • Spherical K-Means: Conduct spherical clustering on a hypersphere:
from spsklearn.cluster import SphericalKMeans
spkm = SphericalKMeans()
spkm.fit(data)
...
  • von Mises-Fisher Mixture Model: use a mixture of von Mises-Fisher distributions to model the data on a hypersphere.
from spsklearn.mixture import vonMisesFisherMixture
vmfmm = vonMisesFisherMixture(n_components=3)
vmfmm.fit(data)
...

Install

python setup.py build_ext --inplace
python setup.py install