Mombu2012-04-27 11:08:44

Hi!

Executive summary:

I’m looking for a function with the following properties:

f(0) = 0.0

f(1) = 1.0

F(t) – F(0) = 0.5

Help!

Background:

I’m working on a jukebox-like application called FairDJ. To select the

next song to play it gives all known songs a score, then sorts the list

of songs by score, then chooses one at random, biased towards the top

of the list.

The amount of bias in the selection function is something that I’m

optimizing. Biasing too heavily towards the start of the list will

make the song selection good but boring. Biasing too little will vary

the song selection a lot, but people will never get to hear the songs

they actually like.

What I do to select a song is that I take a linear random value between

0.0 and 1.0. Then I transform it to a biased value using f(x). The

biased value is still between 0.0 and 1.0.

So the first two conditions for the differential equation are:

f(0) = 0.0

f(1) = 1.0

Then I’d like to be able to say “I want 50% of the selected songs to be

in the top t fraction of the list”. I *think* that could be expressed

thusly:

F(t) – F(0) = 0.5

Does that sound reasonable? Is there a function that matches my

requirements?

Since t doesn’t change that often, I could potentially use f(x)=x^(Kt)

and re-compute K numerically every time t changes. But if there’s an

algebraic solution I’d prefer using that.

Cheers //Johan

Maarten van re2012-04-28 06:24:40

Hi Johan,

You may be interested in an exponential distribution:

http://en.wikipedia.org/wiki/Exponential_distribution.

From the cumulative density distribution you’ll find that 50% is where

t = ln(2) / lambda

HTH, Maarten

—

===================================================================

Maarten van Reeuwijk dept. of Multiscale Physics

Phd student Faculty of Applied Sciences

maarten.vanreeuwijk.net Delft University of Technology

## Leave a Reply

You must be logged in to post a comment.