|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
ad weights
Author: Jim McAtee
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163709
> Your first solution would run into the problem of having a huge amount
of low
> ads and few high ones. Lets say a banner system has 8 free ads and 5
paying
> ones. showing the paying ones multiple times (lets say 5 per) will
result in 33
> total ads with the free ads having a 3% view rate and the pay having a
15%. Now
> take it further. 90 free ads and 2 pay ads with the pay ads having the
same 5
> per. This results in each free ad having 1% and the pay ads having 5%.
Pay ads
> are still higher, but if you look at the full numbers you see that 9
times out
> of 10 a free ad will be shown. Not very economical.
Neither were suggestions of how you should weight your ads, just how you
might approach it. Probably the only monkey wrench in your situation are
the free ads and the fact that a large number of them can take up a
disproportianate percentage of your rotation. I think you've got two
basic approaches.
One, weight the paying ads very very heavily in relation to non-paying
ads. For instance:
Ad_ID Price Weight
----- ------ ------
1 $0.00 1
2 $0.05 5000
3 $0.00 1
4 $0.01 1000
5 $5.00 500000
6 $0.25 25000
But you can still run into the problem of a very large number of the free
ads taking up perhaps more views in the rotation than you like. If that
happened you'd have to go through and further bump up the weighting of the
pay ads.
The second approach (which you hinted at in your original posting) would
be to make the weighting hierarchical. In your case you'd probably just
need two levels. At the first level create two 'groups' - paying and
non-paying ads. Throw all free ads into one group. You could weight the
ads within the free group in relation to each other, but it's probably
unnecessary and every ad could have an equal weight of '1'.
Into the second group, have your paying ads, weighted relative only to
other ads in the same group. Here you could probably just use a weighting
in proportion to the price of each - a $1.00 ad with a weight 10x that of
a $0.10 ad, for example.
Then weight the groups relative to each other. Say paying ads 75%,
non-paying 25% (or whatever). Then it doesn't matter how many non-paying
ads you have, they always take up a known percentage of the views in your
rotation. You're algorithm would make two picks - first select a group,
then select an ad within the group.
Author: Ryan Kime
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163638
Just thought I would throw out a different angle...
Instead of assigning weights to each ad, why not assign it to a weight
range? For instance, your cheapest ad is $.01 and your biggest ad is $10.00
(which is constantly in flux). Take the range and divide it into however
many groups you want, say 10 for consistency's sake. Then come up with a
priority algorithm for the 10 groups (taking into account a possible 0 ads
in a group). So your ad at $4.01 would be in group 5, but if the top got
bumped up to $10.10 it would bump it down to group 4.
So your example of 99 $.01 and one $5 ad would show a high priority to the
$5 ad and a lesser chance to be seen at the $.01 rate as group 1 would not
have as much exposure.
Ryan Kime
<mailto:rkime@webcoindustries.com> rkime@webcoindustries.com
Web Developer
Webco Industries
Here's a fun task. I'm building pay per click ads for HoF (in place of
banner
ads and yes, the list ads are coming off). One thing is that I need to give
each
ad a weight in relation to another to show how often it should come up. I've
thought of a few ideas and wanted to hear what others think.
Basically, there's a table of ads that's dumped into an application array
for
caching. The question is, how to dump the ads in order to give 'high paying'
ads
more show than 'low paying' (or free) ads.
This is one idea:
When this table is dumped into an application array, a position in the array
is
given for each ad for each dollar (or part) it has.
.01 is 1 position.
$1 is 1 position.
$1.01 is 2 positions.
This is rather simple and works well for small amounts of ads, but when you
get
a lot, it fails.
ex: 99 ads at .01 and 1 ad at $5 will equal an array of 104 items. The big
paying ad has a greater chance of being seen in relation to any other ad,
but is
buried under all the low paying ads.
Another idea is to have sub arrays for each price grouping. In this example,
the
chances of a $5 text ad coming up is far greater than a $1 ad and if a $5
comes
up, then it'll be one of several $5 ads. This may work and I'm building it
now.
Critique?
--
Michael Dinowitz
House of Fusion
http://www.houseoffusion.com
Finding technical solutions to the problems you didn't know you had yet
_____
Author: Burns, John D
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163625
An idea that I had may be to hold some sort of structure with the ad
information and a value for priority. Each time the ad is shown (by
random selection), the priority gets bumped down one. (ie. Priority
starts at 5 for an expensive ad meaning it gets shown 5 times for every
1 time that a cheap ad is shown) Once it hits 0 it's removed from the
struct altogether to ensure that all ads get shown. Once all ads have
been shown and there's nothing left in the structure, you would re-query
the original ad list and reset the priority number and start all over
again.
Ads
-adID
-adLink
-adImage
-adPriority
This should support a ton of ads and give a sure-fire way for everyone
to be seen and not put it at chance that the cheap ads might get seen in
between all of the expensive ads, however, the expensive ones would
still get seen more often.
John Burns
Here's a fun task. I'm building pay per click ads for HoF (in place of
banner ads and yes, the list ads are coming off). One thing is that I
need to give each ad a weight in relation to another to show how often
it should come up. I've thought of a few ideas and wanted to hear what
others think.
Basically, there's a table of ads that's dumped into an application
array for caching. The question is, how to dump the ads in order to give
'high paying' ads more show than 'low paying' (or free) ads.
This is one idea:
When this table is dumped into an application array, a position in the
array is given for each ad for each dollar (or part) it has.
.01 is 1 position.
$1 is 1 position.
$1.01 is 2 positions.
This is rather simple and works well for small amounts of ads, but when
you get a lot, it fails.
ex: 99 ads at .01 and 1 ad at $5 will equal an array of 104 items. The
big paying ad has a greater chance of being seen in relation to any
other ad, but is buried under all the low paying ads.
Another idea is to have sub arrays for each price grouping. In this
example, the chances of a $5 text ad coming up is far greater than a $1
ad and if a $5 comes up, then it'll be one of several $5 ads. This may
work and I'm building it now.
Critique?
--
Michael Dinowitz
House of Fusion
http://www.houseoffusion.com
Finding technical solutions to the problems you didn't know you had yet
Author: Michael Dinowitz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163599
Your first solution would run into the problem of having a huge amount of low
ads and few high ones. Lets say a banner system has 8 free ads and 5 paying
ones. showing the paying ones multiple times (lets say 5 per) will result in 33
total ads with the free ads having a 3% view rate and the pay having a 15%. Now
take it further. 90 free ads and 2 pay ads with the pay ads having the same 5
per. This results in each free ad having 1% and the pay ads having 5%. Pay ads
are still higher, but if you look at the full numbers you see that 9 times out
of 10 a free ad will be shown. Not very economical.
The second also shows the problems of randomness. I'd personally reverse the
second some and have 3 categories. The first is free with a 20% chance of
showing an ad, the second is affiliate with a 30% chance of showing an ad and
the final is pay with a 50% chance of showing an ad. In each category are ads
which will be randomly displayed, but the overall chance of getting one category
over another is set.
----- Excess quoted text cut - see Original Post for more -----
Author: Gonzo Rock
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163598
Jim Rocks!
At 04:25 PM 5/18/04, you wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Jim McAtee
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163595
> Here's a fun task. I'm building pay per click ads for HoF (in place of
banner
> ads and yes, the list ads are coming off). One thing is that I need to
give each
> ad a weight in relation to another to show how often it should come up.
I've
> thought of a few ideas and wanted to hear what others think.
> Basically, there's a table of ads that's dumped into an application
array for
> caching. The question is, how to dump the ads in order to give 'high
paying' ads
> more show than 'low paying' (or free) ads.
> This is one idea:
> When this table is dumped into an application array, a position in the
array is
> given for each ad for each dollar (or part) it has.
> .01 is 1 position.
> $1 is 1 position.
> $1.01 is 2 positions.
> This is rather simple and works well for small amounts of ads, but when
you get
> a lot, it fails.
> ex: 99 ads at .01 and 1 ad at $5 will equal an array of 104 items. The
big
> paying ad has a greater chance of being seen in relation to any other
ad, but is
> buried under all the low paying ads.
> Another idea is to have sub arrays for each price grouping. In this
example, the
> chances of a $5 text ad coming up is far greater than a $1 ad and if a
$5 comes
> up, then it'll be one of several $5 ads. This may work and I'm building
it now.
> Critique?
You've got two problems. First, how to represent the data so that you can
easily (and quikly) grab an ad according to some weighting scheme.
Secondly, coming up with the weighting scheme itself.
Don't use an approach where you populate an array, list or table with some
number of duplicate records relative to a weighting. This gets kinda
silly. If you had just two ads, for instance, the first of which you want
to come up 100 times as often as the other, you end up with 101 records
that represent just two entities.
Here's one approach: Assuming the weights you store are relative, you
generate two numbers for each ad.
Say you start with the following in your database:
Ad_ID Weight
----- -------
1 75
2 1
3 25
4 10
5 5
Your generated data structure would look like
Ad_ID Range_Beg Range_End
----- --------- ---------
1 1 75
2 76 76
3 77 101
4 102 111
5 112 116
To pull up a random ad according to its weight, generate a random number
between 1 and 116 and see which record "owns" the number. If you stored
the above as a cached query, then you could use a query of a query to grab
one.
SELECT Ad_ID
FROM cached_ad_qry
WHERE #RandRange(1, 116)# BETWEEN Range_Beg AND Range_End
As far as the weighting scheme itself goes...
The biggest question is probably whether you want the weighting to be
directly proportional to the price paid. For example:
Ad_ID Price Weight
----- ----- -------
1 $5.00 500
2 $0.01 1
3 $0.25 25
4 $0.10 10
5 $0.05 5
If you _don't_ want to weight proportionately to the price, you'll need to
come up with a way to shift the weighting, but you still probably want to
base it on pricing. You might do something like
Ad Price Range Weight
-------------- -------
$0.00 1
$0.01 - $0.02 2
$0.03 - $0.10 3
$0.11 - $0.50 5
$0.51 - $0.99 10
$1.00 - $1.99 18
$2.00 - $4.99 30
$5.00+ 50
or
Ad Price Range Weight
-------------- -------
$0.00 1
$0.01 - $0.99 1.75 * (price * 100)
$1.00 - $2.00 1.50 * (price * 100)
$2.01 - $3.00 1.25 * (price * 100)
$3.00+ 1.00 * (price * 100)
I have no idea how either of these particular weighting schemes would work
out for you, but it should give you some ideas.
Author: Erik Yowell
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163587
Another issue that commonly comes up in rotation is the volume of
traffic/views. The weight doesn't serve much of a purpose unless it'
compared to the aggregation of traffic totals. At least (I believe)
that's how the heavies do it (Doubleclick, etc.) I think they track
traffic for an arbitrary period (lets say 7 days) and use that value as
a basis for weighting the ad distribution.
Erik Yowell
erik@shortfusemedia.com
http://www.shortfusemedia.com
Here's a fun task. I'm building pay per click ads for HoF (in place of
banner
ads and yes, the list ads are coming off). One thing is that I need to
give each
ad a weight in relation to another to show how often it should come up.
I've
thought of a few ideas and wanted to hear what others think.
Basically, there's a table of ads that's dumped into an application
array for
caching. The question is, how to dump the ads in order to give 'high
paying' ads
more show than 'low paying' (or free) ads.
This is one idea:
When this table is dumped into an application array, a position in the
array is
given for each ad for each dollar (or part) it has.
.01 is 1 position.
$1 is 1 position.
$1.01 is 2 positions.
This is rather simple and works well for small amounts of ads, but when
you get
a lot, it fails.
ex: 99 ads at .01 and 1 ad at $5 will equal an array of 104 items. The
big
paying ad has a greater chance of being seen in relation to any other
ad, but is
buried under all the low paying ads.
Another idea is to have sub arrays for each price grouping. In this
example, the
chances of a $5 text ad coming up is far greater than a $1 ad and if a
$5 comes
up, then it'll be one of several $5 ads. This may work and I'm building
it now.
Critique?
--
Michael Dinowitz
House of Fusion
http://www.houseoffusion.com
Finding technical solutions to the problems you didn't know you had yet
_____
Author: Mark W. Breneman
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163586
One real simple idea would be to add the weighted ads to your array X times
in random "slots". Then all you have to decide is how many times you want
the add to show up value of X.
This maybe way too simple for the complexity of what this ad system sounds
like.
Mark W. Breneman
-Cold Fusion Developer
-Network Administrator
Vivid Media
mark@vividmedia.com
www.vividmedia.com
608.270.9770
_____
Sent: Tuesday, May 18, 2004 4:08 PM
To: CF-Talk
Subject: ad weights
Here's a fun task. I'm building pay per click ads for HoF (in place of
banner
ads and yes, the list ads are coming off). One thing is that I need to give
each
ad a weight in relation to another to show how often it should come up. I've
thought of a few ideas and wanted to hear what others think.
Basically, there's a table of ads that's dumped into an application array
for
caching. The question is, how to dump the ads in order to give 'high paying'
ads
more show than 'low paying' (or free) ads.
This is one idea:
When this table is dumped into an application array, a position in the array
is
given for each ad for each dollar (or part) it has.
.01 is 1 position.
$1 is 1 position.
$1.01 is 2 positions.
This is rather simple and works well for small amounts of ads, but when you
get
a lot, it fails.
ex: 99 ads at .01 and 1 ad at $5 will equal an array of 104 items. The big
paying ad has a greater chance of being seen in relation to any other ad,
but is
buried under all the low paying ads.
Another idea is to have sub arrays for each price grouping. In this example,
the
chances of a $5 text ad coming up is far greater than a $1 ad and if a $5
comes
up, then it'll be one of several $5 ads. This may work and I'm building it
now.
Critique?
--
Michael Dinowitz
House of Fusion
http://www.houseoffusion.com
Finding technical solutions to the problems you didn't know you had yet
_____
Author: Ben Doom
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163585
----- Excess quoted text cut - see Original Post for more -----
A variation on this would be to have an array of structs like this:
ads[n] [min]
[max]
[ad_stuff]
Where min and max are the minimum and maximum values where your random
number will "hit" (for random number n, display this ad if min<=n<=max).
Then you can do a binary or smart search, which will be pretty fast.
Cache the result for 15 or 30 (or 5) seconds in the application scope,
and you'll avoid having to do the search (the slow bit) too often (just
a simple time compare).
> Another idea is to have sub arrays for each price grouping. In this
> example, the
> chances of a $5 text ad coming up is far greater than a $1 ad and if a
> $5 comes
> up, then it'll be one of several $5 ads. This may work and I'm building
> it now.
> Critique?
Without knowing how you plan on "weighting" the dollar values, I can't
comment too much.
However, you could do something similar to what I've listed above.
Another idea might be instead of min/max wieghting (by probability) you
create an actual hard number of displays per "cycle" where a cycle
includes all the assigned displays of all ads. That is, instead of a
min and max, you have a displaycount, and you decrement it every time
that ad is displayed. When it hits 0, remove the array row. When the
array is empty, refresh it.
--BenD
Author: Barney Boisvert
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163584
I recently set up two photo galleries using two different mechanisms.
The first used ratings (iTunes style) to prioritize. 5 stars meant 5 times
the frequency of a 1 star photo. That worked well. I cached a list of Ids
(with 5 star photos being listed 5 times), in the app scope, picked an index
at random when I needed an image, and then used the ID at that index to
fetch the actual image data. That way I didn't have to store the image data
5 times for 5 star photos. This works well for screensaver or slideshow
type apps, where you just want a random photo, and you want one you like
more often than not.
The second organized the photos into directories (conceptually, at least).
To select a photo, first a directory was selected at random (no weighting),
and then an image was selected from that directory at random (again, with no
weighting). You could certainly weight the categories differently, and even
the individual items, but that's a lot of nastiness, potentially. This
works well if you want to control distribution across the categories, but
not necessarily individual images.
I think the latter is basically what you're describing at the end of your
message.
Cheers,
barneyb
----- Excess quoted text cut - see Original Post for more -----
Author: Matt Liotta
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163583
I think you need to provide more information. It is easy enough to
order ads based on some sort of weight, but how does that weight change
after the ad is served? Should an expensive ad be served twice as many
times as an inexpensive ad? Three times? What about a moderately priced
ad? Should it be served twice as many times as an inexpensive ad, but
half as much as an expensive ad?
-Matt
On May 18, 2004, at 5:08 PM, Michael Dinowitz wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Michael Dinowitz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32593#163582
Here's a fun task. I'm building pay per click ads for HoF (in place of banner
ads and yes, the list ads are coming off). One thing is that I need to give each
ad a weight in relation to another to show how often it should come up. I've
thought of a few ideas and wanted to hear what others think.
Basically, there's a table of ads that's dumped into an application array for
caching. The question is, how to dump the ads in order to give 'high paying' ads
more show than 'low paying' (or free) ads.
This is one idea:
When this table is dumped into an application array, a position in the array is
given for each ad for each dollar (or part) it has.
.01 is 1 position.
$1 is 1 position.
$1.01 is 2 positions.
This is rather simple and works well for small amounts of ads, but when you get
a lot, it fails.
ex: 99 ads at .01 and 1 ad at $5 will equal an array of 104 items. The big
paying ad has a greater chance of being seen in relation to any other ad, but is
buried under all the low paying ads.
Another idea is to have sub arrays for each price grouping. In this example, the
chances of a $5 text ad coming up is far greater than a $1 ad and if a $5 comes
up, then it'll be one of several $5 ads. This may work and I'm building it now.
Critique?
--
Michael Dinowitz
House of Fusion
http://www.houseoffusion.com
Finding technical solutions to the problems you didn't know you had yet
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||