Fw: Clustering::Distance.php
| From: | alfredo | Date: | Mon, 12 Aug 2002 09:33:59 +0000 |
| Subject: | Fw: Clustering::Distance.php | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-8315@lists.php.net to get a copy of this message | ||
Hi! (again)
Here's some code i've coded for measuring distances and similarities, a basic step in
clustering of data (thanks Jesus).
Not all clustering methods are working (???) but I'm working on it :-)
Distance.php: A library for distance measuring. It includes a pear class, Clus_Distance which
implements diverse methods
as internal functions. I have tought about reasons not to make a parent class and derive child
classes for each method, but
please feel free to make any comments that you think might help to PEARIZE this code w/o harming
efficience.
example1.php: A simple example that reads from data file, and shows similarity matrices (upper
triangular) for each method.
swiss.txt: Some sample data. The last column is the class number of each item, as outputed from a
k-means
implementation (not in php), so we'll be living on R^6 and comparing these to ours.
please review it, and make any comments you like!!
Alfredo
http://alfredorahn.com
Attachment: [application/x-zip-compressed] Distance.zip
Attachment: [application/x-zip-compressed] Distance.zip