Re: Ranking function



On 3 Aug 2005 16:08:35 -0700, vjtadepalli@xxxxxxxxx wrote:

> Hello all, I have a set of values. Each value in the set should be
> compared to a constant, say for example 1.5. Based on how close the
> given value is to this constant, it is assigned a 'rank' between 1 to
> 10. When the given value is equal to the constant, the record is
> assigned a 'rank' 10. For example assume the following set of values,

We statisticians tend to use the word "rank" in a very
particular way -- Sort a bunch of N numbers into order,
and "rank" them by assigning 1 ... N to them. Where
there are ties, it is often convenient to average the
assigned digits together. Thus, if 3 Givens were equal
to the Constant, there would be a tie for ranks (in
"distance from constant") of 1,2,3; and all three would
be assigned a Rank of 2. Also, it could be called a tie
at (N-1), if the rankings are arbitrarily reversed by sorting
in the opposite order.

You seem to be asking about generating an arbitrary "score."
>
> ID Given Value Constant
> 1 1.3 1.5
> 2 1.7 1.5
> 3 1.2 1.5
> 4 1.5 1.5
>
> In the above data, record 4 should be assigned 10, as it is the best
> possible match. But, how do I go about assigning ranks to the values
> that is either greater or lesser than 1.5? The negative and positive
> error has the same effect on the ranking, i.e., 1.3 and 1.7 both should
> be assigned same rank.

Generate a score in steps --
find the difference in desired units,
then scale it to the desired range,
then reverse it (if that is wanted).

Okay, if +/- does not matter, you can use absolute
difference, or squared difference. Or something else.

Here are examples --
1) Your absolute distances are (.2, .2, .3, 0).
2) Your squared distances are (0.04, 0.04, 0.09, 0.).
3) Your *ranked* distances are (2.5, 2.5, 4, 1) (if you want
to use "ranking" in its technical sense).

What is the furthest possible distance, or biggest rank?
Scaled to 9 points in all, which is the *range* for 1-10,
the numbers above will give you
1a) (6,6,9,0) by multiplying by 30;
2a) (4,4,9,0) by multiplying by 100;
3a) (7.5, 7.5, 12, 3) by multipying by 3.
- I looked at each set, and figured what would give a
range of 9 points. If you want to reserve a value for the
maximum distance - which will be scored "1" - you need
to use that value for figuring the range of 9 points.


Reversed and set to 1-10, the above results become
1b) (4,4,1,10) by subtracting from 10;
2b) (6,6,1,10) by subtracting from 10;
3b) (6.5, 6.5, 1, 10) by subtracting from 13.


--
Rich Ulrich, wpilib@xxxxxxxx
http://www.pitt.edu/~wpilib/index.html
.



Relevant Pages

  • Re: And yet more shiao jiao clips
    ... I was assigning the 'blame' to the liars that told it to us. ... but I don't think that 'judo' was a noble's art. ... 'Rank' wasn't necessary in village practice groups- as now, ...
    (rec.martial-arts)
  • Ranking function
    ... given value is to this constant, it is assigned a 'rank' between 1 to ... how do I go about assigning ranks to the values ... Vijay. ... Prev by Date: ...
    (sci.stat.math)
  • Re: RANK Function Modified?
    ... >>I believe a need a slighly modifed version of the RANK ... >> TIE in a score. ... >> amongst all the tied players, so that each player in this ... so points might need to be divided amongst three or ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Breaking a tie - Excel 2003
    ... I want to use tie-breaker #1 ONLY to break the initial tie. ... show my new rank vs. my original rank. ... In order to break the tie I have three tie-breaking conditions (tie-breaker ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Ranking Formula
    ... the first cell will automatically go to the next number in instance of a ... But you didn't explain any of this in your original post. ... to rank, with this ranking it will then autofill into a inventory ...
    (microsoft.public.excel.misc)