SkillAgentSearch skills...

Bregclus

Python implementation of Bregman Hard Clustering and Bregman Soft Clustering as a scikit-learn module.

Install / Use

/learn @juselara1/Bregclus
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Clustering with Bregman Divergences

Python implementation of Clustering with Bregman Divergences as a scikit-learn module:

  • Banerjee, A., Merugu, S., Dhillon, I. S., & Ghosh, J. (2005). Clustering with Bregman divergences. Journal of machine learning research, 6(Oct), 1705-1749. pdf

Requirements


If you have anaconda installed, you can create an environment with the dependences as follows:

conda env create -f requirements.yml

Then, you must activate the environment:

source activate env

or

conda activate env

Installation


You can install this package via setuptools:

python setup.py install

Usage


You can use the models as you usually do in sklearn:

from bregclus.models import BregmanHard
from bregclus.divergences import euclidean
import numpy as np

X = np.random.uniform(size=(100, 2))

model = BregmanHard(n_clusters=5, divergence=euclidean)
model.fit(X)
y_pred = model.predict(X)

Feel free to check the example codes: examples/

python euclidean_hard.py
python mahalanobis_hard.py

Related Skills

View on GitHub
GitHub Stars7
CategoryEducation
Updated8mo ago
Forks2

Languages

Python

Security Score

82/100

Audited on Jul 29, 2025

No findings