Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: RFC: Fuzzy Clustering with Perl

by lin0 (Curate)
on Nov 04, 2006 at 20:07 UTC ( [id://582268]=note: print w/replies, xml ) Need Help??


in reply to RFC: Fuzzy Clustering with Perl

I just added a description for the distance function. The next step will be to modify the script in such a way that the user can select between different distance functions. This might seem trivial at first but it is not. As I mentioned in the description of the distance function, different distance functions will result in different ways of computing the prototypes. If you have any suggestion on how I could generalize the computation of the prototypes based on the selected distance function, please, drop me a line

Thank you,

lin0

Replies are listed 'Best First'.
Re^2: RFC: Fuzzy Clustering with Perl
by dk (Chaplain) on Nov 06, 2006 at 15:11 UTC
    You might want to encapsulate the code under a sub, where one of parameters will be the distance function name. Other parameters could also be named parameter, as well. This is a very widely spread perl technique. For example, this sub would be called then as
    my $result = cluster( num_clusters => 5, data => [1,2,3,4,5], distance => 'procrustes' );
    This way, if the programmer does not specify all parameters, there will be subsituted sensible defaults ( possibly different for each distance ). Also the sub can die if there's not enough or invalid parameters given.

      Hi dk

      Thanks for the pointer. Now, I am working on a new version of the script. I will have it ready this weekend. I hope you could have a look at it and make some comments

      Cheers!

      lin0

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://582268]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found