new Contourd();

Ivan Cukic ivan.cukic at kde.org
Tue Sep 6 10:03:26 UTC 2011


I've pushed the new contour daemon which unlike it was advertised doesn't 
break everything. The dataengine is patched to work with the new daemon 
and currently it shows some recommendations (at least on the desktop - 
will test on exo when the image is available).

There are currently two recommendation engines:
- the links (scripted) shows a few links (meant for testing purposes only)
- the mediapause - currently works with bangarang - while the player is 
running, it shows the option to pause it. Completely useless, but since 
there is no light sensor on the desktop, I wasn't able to do it like we 
talked about. Will do it once this gets on exo.

The scored documents engine will come soon :) after that, we are on the 
same level as the old contour daemon (ok, not the same, a few ft above)

** Scoring the recommendation engines

I'm currently working on making the recommendation engines scored when the 
user chooses an action.

The method is as follows:

1 - the chosen engine's score is increased by a constant called $learning$
2 - the list of recommendations is iterated - for each do:
   - 2.1 - decrease the score of the engine by $learning * exp(-x)$
             where x is the order of the recommendation in question,
             starting with 1

How does this work?

The first thing is that what we are trying to keep the sum of scores after 
the change the same as before. It doesn't really work, but it is close 
enough since integral of exp(-x) from 0 to Inf is 1 - we don't have 1, but 
something lower since in our case, we have a discrete sum of a finite 
number of elements - exp(-1) + exp(-2) + ... + exp(-number_of_recomms).

Effects

- If an engine is too confident and gives a high score to its result, but 
that result was not chosen, it will be punished more than other results 
due to the exp(-x) part.
- the more recommendations an engine gives, the higher punishment it will 
receive in the case none of its recomms are selected.
- if the engine behaves like in the previous example, but one of its 
recomms is selected, it will have an increased score, but not as increased 
as the engine that made only one recomm. This is due to the fact that 
although it will get a reward for the good suggestion, it will get 
punished for the bad ones as well.

I've been testing this on the two engines we have, and it is quite fun :)


Cheerio,
Ivan

p.s. I friggin' love the exp function :)


-- 
So remember when you're feeling very small and insecure
How amazingly unlikely is your birth
And pray that there's intelligent life somewhere up in space
Because there's bugger all down here on earth.
    -- Monty Python



More information about the Active mailing list