in reply to Ranking people by weight and height
On normalization: It really depends on the nature of your attributes, as to what kind of normalization makes sense. One easy way would be to arbitrarily assign the maximum value of any one attribute the value "1", and scale the rest of the values of that attribute from 0 to 1. But again, this probably wouldn't make sense in all cases- certainly not with heights and weights.
As for the perlish aspects: I'd recommend storing each person as a hash, with each attribute name and value as a key-value pair in that hash. That way you can add more attributes, or data about the attributes (normalized values, sums, etc) into each person without adding more and more arrays into your code. Other than that, once you decide on a solution post some code and I'm sure someone will be happy to help :)
Alan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Algorithm concerns
by rinceWind (Monsignor) on May 03, 2002 at 14:22 UTC | |
|
Re: Re: Algorithm concerns
by Anonymous Monk on May 03, 2002 at 16:00 UTC | |
by ferrency (Deacon) on May 03, 2002 at 16:20 UTC |