Databases Reference
In-Depth Information
There are plenty of different ways to go about building such a model,
but they have very similar feels if not implementation. We're going to
show you how to do one relatively simple but compete version in this
chapter.
To set up a recommendation engine, suppose you have users , which
form a set U ; and you have items to recommend, which form a set
V . As Kyle Teague told us in Chapter 6 , you can denote this as a bi‐
partite graph (shown again in Figure 8-1 ) if each user and each item
has a node to represent it—there are lines from a user to an item if that
user has expressed an opinion about that item. Note they might not
always love that item, so the edges could have weights: they could be
positive, negative, or on a continuous scale (or discontinuous, but
many-valued like a star system). The implications of this choice can
be heavy but we won't delve too deep here—for us they are numeric
ratings.
Figure 8-1. Bipartite graph with users and items (television shows) as
nodes
Next up, you have training data in the form of some preferences—you
know some of the opinions of some of the users on some of the items.
From those training data, you want to predict other preferences for
your users. That's essentially the output for a recommendation engine.
You may also have metadata on users (i.e., they are male or female,
etc.) or on items (the color of the product). For example, users come
to your website and set up accounts, so you may know each user's
gender, age, and preferences for up to three items.
 
Search WWH ::




Custom Search