AdBlockLearner (http://adblocklearner.mozdev.org) learns which parts of a given URL are predictors of whether the URL should be blocked or not, thus only relying on the user's basic feedback (click to block an image, select to unblock an image).
The learning technique is a simple weighted majority vote. The Javascript code below shows how the weight of the "experts" (i.e. the URL chunks obtained by tokenization) are updated when a user decides to block a given image:
for (var i = 0; i < Items_Table.length; i++) { if ( imgUrl.indexOf(Items_Table[i]) != -1) { //it matches: promote the expert Weights_Table[i] = (1/beta) * Weights_Table[i]; } else { // the coward abstained! punish him mildly Weights_Table[i] = ( (1 + (beta * beta))/ (2 * beta) ) * Weights_Table[i]; } }refs: [1] [2]for (var i = 0; i < NegItems_Table.length; i++) { if ( imgUrl.indexOf(NegItems_Table[i]) != -1) { //it matches: punish the expert NegWeights_Table[i] = beta * NegWeights_Table[i]; } else { // the coward abstained! punish him mildly NegWeights_Table[i] = ( (1 + (beta * beta))/ (2 * beta) ) * NegWeights_Table[i]; } }