-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKG-INFO
67 lines (54 loc) · 1.91 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Metadata-Version: 2.1
Name: lshkcenters
Version: 1.0.3
Summary: A python package for LSH-k-Centers algorithm
Home-page: https://github.com/
Author: toanstt
Author-email: [email protected]
License: UNKNOWN
Description: Python implementations of the LSH-k-Centers algorithms for clustering categorical data:
## Installation:
### Using pip:
```shell
pip install lshkcenters
```
### Import the packages:
```shell
import numpy as np
from LSHkCenters.LSHkCenters import LSHkCenters
```
### Generate a simple categorical dataset:
```shell
X = np.array([[0,0,0],[0,1,1],[0,0,0],[1,0,1],[2,2,2],[2,3,2],[2,3,2]])
y = np.array([0,0,0,0,1,1,1])
```
### LSH-k-Centers:
```shell
kcens = LSHkCenters(X,y,n_init=5,k=2)
kcens.SetupLSH()
kcens.DoCluster()
```
### Built-in evaluattion metrics:
```shell
kcens.CalcScore()
```
### Out come:
```shell
Purity: 1.000 NMI: 1.00 ARI: 1.00 Sil: -1.00 Acc: 1.00 Recall: 1.00 Precision: 1.00
```
### Built-in fuzzy evaluattion metrics:
```shell
kcens.CalcFuzzyScore()
```
### Out come:
```shell
Fuzzy scores PC:1.00 NPC:1.00 FHV↓:0.02 FS↓:-2000.00 XB↓:0.11 BH↓:0.06 BWS:-2000.00 FPC:3.50 SIL_R:0.70 FSIL:0.70 MPO:12.15 NPE:0.01 PE:0.01 PEB:0.01
```
## References:
*To be updated*
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown