0
$\begingroup$

I have been trying to assign weights to set of objects. The problem that I have is as following.

I have a set of objects ordered either ascending or decending. . Each object shall be provided a weight that is in between 0 and 1, either ascending or decending corresponding to the order of the objects. . The weights cannot be repeated . Sum of the weights shall be 1

I would appreicate infos with regards to algorithms and methods that I can look into.

$\endgroup$
7
  • 1
    $\begingroup$ Why not generate numbers uniform on (0,1), normalise them to add to 1 and then sort them? I suspect I have completely missed the point of what you are doing which is why this is only a comment not an answer. $\endgroup$
    – mdewey
    Commented Mar 7, 2022 at 13:39
  • 1
    $\begingroup$ Literally any set of distinct positive numbers will work: divide each by their sum to make the resulting weights sum to unity; sort them; and assign them, in order, to your sorted objects. Since this clearly has nothing to do with any property of the objects (other than their count), its utility or applicability to any form of data analysis is obscure. Would you mind telling what you hope this will achieve? $\endgroup$
    – whuber
    Commented Mar 7, 2022 at 13:42
  • $\begingroup$ @Whuber, perfect! This gives exactly what I want. I would assign objects a number from 1 to N and divide by the sum of the values give me what I would be looking for. This is to assign the weights in a set of objects. Each set can have same objects but their weights differ by the time they have arrived into the set. In the end I would like to sum the weights of the objects over many sets to decide the ranking of the objects. Does it make any sense? $\endgroup$
    – sveer
    Commented Mar 7, 2022 at 19:00
  • $\begingroup$ @mdewey, i am not sure if understand you correctly. $\endgroup$
    – sveer
    Commented Mar 7, 2022 at 19:08
  • 1
    $\begingroup$ Mathematically it works, but it is difficult to see what it actually accomplishes, since the result depends arbitrarily on how you determine the weights--and, as we have seen, there are a great many ways to do that. $\endgroup$
    – whuber
    Commented Mar 8, 2022 at 19:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.