1. A computer-implemented method of detecting spam in a collection of web pages, the method comprising: receiving a first subset of the collection of web pages marked by a trusted entity as spam; receiving a second subset of the collection of web pages marked by the trusted entity as content; identifying a classifier function by encouraging, with a cost function penalty, the web pages in the first subset to take a value close to a spam value and the web pages in the second subset to take a value close to a content value, and penalizing, with the cost function, differences in function values over nodes in the collection of web pages; utilizing a computer processor to classify a set of unlabeled web pages as spam or content based on the classifier function values assigned; and outputting an indication of the classification of the unlabeled web pages as spam or content for use by a user.