Search By Popularity Algorithm?

  • Thread starter Thread starter pbd22
  • Start date Start date
P

pbd22

HI.

I have been tasked with building a feature into our system that
returns
search results based on popularity. We are using VB.NET/MySQL.

The content is video streams associated with long descriptions. So,
if somebody likes a piece of content he or she might click on the
details page, read about it, and then watch the stored video stream.

The terms of the popularity search are really up in the air. I am
thinking
it would be good to include javascript "stars" next to each video
that
allows users to rate a gven video (much like google does with rating
a given user's response to a tread).

Any and all advice, code, links, etc that could help me get started
would
be helpful.

Thanks.
 
The terms of the popularity search are really up in the air. I am
thinking
it would be good to include javascript "stars" next to each video
that
allows users to rate a gven video (much like google does with rating
a given user's response to a tread).

Any and all advice, code, links, etc that could help me get started
would
be helpful.

To do popularity and ranking you'll need to log the data somewhere. Once
you have the information in the DB, it's relatively easy to sort and pick
the most popular videos or calculate an average rating.
 
OK.

I am guessing you say popularity is trivial because
if there is some sort of user feedback sorting through
that data provides useful results. But, what if an given
item was immensely popular a year ago and unpopular
today. Wouldn't this "currently unpopular" video still rank
as more popular than currently more popular items (because
it has a higher numerical rank in the DB)?

Thanks again.
 
But, what if an given
item was immensely popular a year ago and unpopular
today. Wouldn't this "currently unpopular" video still rank
as more popular than currently more popular items (because
it has a higher numerical rank in the DB)?

Develop your own algorith - i.e. today's hits are weight more heavily than
previous hits. The current weeks more than previous weeks. The current
month more so than previous months, etc. To do so you'll need to include a
date time column.

It's not rocket science - just think through how you want to weight your
data.
 
Thanks.

I know it isn't rocket science.
But, all the same, it is not clear
to me what that "weight" would
exactly look like. For example,
lets say I have a table called "Popularity".
In it, columns:

ID (FK to content item)
Votes
DateTime

How do I "weigh" the difference between
a content item that had 10 votes yesterday
and 0 today and another item that had
5 yesterday and 5 today? Is the latter more
popular because it has had a more recent
vote count even though the total count is the
same?

I am just thinking out loud right now but, it
seems to me that this could lead to some
unusual results.

I guess I could use some examples (pseudo code,
maybe?) of what you mean by "weight"?

thanks again.
 
How do I "weigh" the difference between
a content item that had 10 votes yesterday
and 0 today and another item that had
5 yesterday and 5 today? Is the latter more
popular because it has had a more recent
vote count even though the total count is the
same?

In your eyes, which is more popular. I am not one to determine that for
you.

But you could do something like:


(Today Votes * 1) + (Yesterday Votes * .5) / Total Votes

That'll weight yesterday votes at 1/2 value.

I am just thinking out loud right now but, it
seems to me that this could lead to some
unusual results.

True, but if you have a statistics background you could develop a more
complex algorith,
I guess I could use some examples (pseudo code,
maybe?) of what you mean by "weight"?

Weight means value, you can weight certain day ranges with a higher
value.
 
Back
Top