Skip to content

Commit eae77e7

Browse files
aklenitskiyaklenitskiy
authored andcommitted
change package name to diameter_clustering
1 parent ef9b5bc commit eae77e7

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Clustering algorithms with maximum distance between points inside clusters.
44

5-
When we have interpetable metric like cosine distance it could be good to have clusters with maximum distance between points. Then we can find good threshold for maximum distance and be confident that points inside clusters are really similar. Unfortunately popular algorithms don't have such behavior.
5+
When we have interpetable metric like cosine distance it could be nice to have clusters with maximum distance between points. Then we can find good threshold for maximum distance and be confident that points inside clusters are really similar. Unfortunately popular clustering algorithms don't have such behavior.
66

77
Main algorithm is MaxDiameterClustering. It is a simple greedy algorithm, in which we add points one by one. If there is a cluster with all points close enough to new points, then we add new point to this cluster. If there is no such cluster, this point starts new cluster.
88

@@ -15,7 +15,7 @@ Also two similar algorithms are added - Leader Clustering and Quality Threshold
1515
Basic usage of MaxDiameterClustering:
1616
```python
1717
from sklearn.datasets import make_blobs
18-
from diameter import MaxDiameterClustering
18+
from diameter_clustering import MaxDiameterClustering
1919

2020
X, y = make_blobs(n_samples=100, n_features=50)
2121

@@ -34,7 +34,7 @@ labels = model.fit_predict(X_normalized)
3434

3535
Instead of using feature matrix `X` we can pass precomputed distance matrix:
3636
```python
37-
from diameter.dist_matrix import compute_dist_matrix
37+
from diameter_clustering.dist_matrix import compute_dist_matrix
3838

3939
dist_matrix = compute_dist_matrix(X, metric='cosine')
4040

@@ -64,7 +64,7 @@ labels = model.fit_predict(X)
6464
### Leader Clustering
6565

6666
```python
67-
from diameter import LeaderClustering
67+
from diameter_clustering import LeaderClustering
6868

6969
model = LeaderClustering(max_radius=0.15, metric='cosine')
7070
labels = model.fit_predict(X)
@@ -77,7 +77,7 @@ could be used as in MaxDiameterClustering.
7777
### Quality Threshold Clustering
7878

7979
```python
80-
from diameter import QTClustering
80+
from diameter_clustering import QTClustering
8181

8282
model = QTClustering(max_radius=0.15, metric='cosine', min_cluster_size=5)
8383
labels = model.fit_predict(X)

tests/test_dist_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import scipy
55
from sklearn.datasets import make_blobs
66

7-
from diameter.dist_matrix import compute_dist_matrix, compute_sparse_dist_matrix
7+
from diameter_clustering.dist_matrix import compute_dist_matrix, compute_sparse_dist_matrix
88

99

1010
X, y = make_blobs(n_samples=100, n_features=50, random_state=42)

tests/test_greedy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from scipy.spatial.distance import pdist
55
from sklearn.datasets import make_blobs
66

7-
from diameter import MaxDiameterClustering
8-
from diameter.dist_matrix import compute_dist_matrix, compute_sparse_dist_matrix
7+
from diameter_clustering import MaxDiameterClustering
8+
from diameter_clustering.dist_matrix import compute_dist_matrix, compute_sparse_dist_matrix
99

1010

1111
MAX_DISTANCE = 0.5

0 commit comments

Comments
 (0)