Re: Weighted Random Ordering
From: Jonathan Fry (jon_at_NOSPAM.spss.com)
Date: 11/08/04
- Next message: Richard Ulrich: "Re: Weighted Random Ordering"
- Previous message: David B. Chorlian: "Re: So Lost...Uniform distribution of a continuous variable."
- In reply to: Arsen V.: "Weighted Random Ordering"
- Next in thread: Richard Ulrich: "Re: Weighted Random Ordering"
- Reply: Richard Ulrich: "Re: Weighted Random Ordering"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Nov 2004 15:32:59 -0600
"Arsen V." <av2000@gmail.com> wrote in message
news:ceb1d8a4.0411080936.3c371ee3@posting.google.com...
> Hello,
>
> I have a list of items with some weights (let's say price), and I want
> to shuffle this list into a random order but give extra chances for
> items with heigher price to appear first.
>
> In other words, I want the more expensive items to have higher
> probability of getting the top positions in the resultant random
> ordered list.
>
> What is the best distribution to use for this? Could you provide some
> pseudo-code examples?
>
> Thanks,
> Arsen
--------------------
Try sorting the items by the product of price times a uniform random number
drawn for that object. If you want price to have less effect, use its
logarithm or square root in its place; if you want price to have more
effect, use its square, its cube, or even its exponential function.
Jonathan Fry
SPSS Inc.
- Next message: Richard Ulrich: "Re: Weighted Random Ordering"
- Previous message: David B. Chorlian: "Re: So Lost...Uniform distribution of a continuous variable."
- In reply to: Arsen V.: "Weighted Random Ordering"
- Next in thread: Richard Ulrich: "Re: Weighted Random Ordering"
- Reply: Richard Ulrich: "Re: Weighted Random Ordering"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|