Skip to content

ardell/clusterer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clusterer
A pair clustering algorithm in PHP. Released under the MIT license.

To install: pear install channel://ardell.pearfarm.org/Clusterer

This algorithm takes pair data, for instance "a is near b" and "b is near c" to produce clusters (a, b, c).

Input should be provided as an array of 2 item arrays, e.g:
$pairs = array(
    array('a', 'b'),
    array('b', 'c'),
    array('d', 'e'),
    array('d', 'f'),
    array('g', 'h')
)

Clusterer::cluster($pairs); // will return...
array(
    array('a', 'b', 'c'),
    array('d', 'e', 'f'),
    array('g', 'h')
)

Thanks to Alan Pinstein for help developing and writing the algorithm.

About

A pair clustering algorithm in php.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages