Skip to content

jgutierrezre/lshkcenters-1.0.3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python implementations of the LSH-k-Centers algorithms for clustering categorical data:

Installation:

Using pip:

pip install lshkcenters

Import the packages:

import numpy as np
from LSHkCenters.LSHkCenters import LSHkCenters

Generate a simple categorical dataset:

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:

kcens = LSHkCenters(X,y,n_init=5,k=2)
kcens.SetupLSH()
kcens.DoCluster()

Built-in evaluattion metrics:

kcens.CalcScore()

Out come:

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:

kcens.CalcFuzzyScore()

Out come:

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published