Ranking function



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,

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.

Thanks in advance.
Vijay.

.



Relevant Pages

  • Re: Ranking function
    ... > assigned a 'rank' 10. ... it could be called a tie ... how do I go about assigning ranks to the values ... then reverse it. ...
    (sci.stat.math)
  • 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)
  • Re: PvI TC: T1 Standings
    ... Your corrected score is ... and your current rank is 4th ... Vijay ... Prev by Date: ...
    (rec.sport.cricket)
  • Re: @_ aliasing
    ... by assigning them to lexically scoped vars unless you're sure ... you want to change the aliased variables. ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: cant read file?
    ... You're passing &ch as an argument to fcanf() ... *and* you're assigning the result to ch. ... (I'm not certain whether it invokes undefined behavior, ... Prev by Date: ...
    (comp.lang.c)