Recommender systems are a subclass of machine learning, which rank predictions based on a set of criteria. The rankings are tailored, then returned, to each training example. Training examples usually end up being a unique identifier, such as a specific user or product, rather than random data. Thus, these systems are especially useful in customizing content and data to specific needs, such as songs, news, products, etc., based on user preferences. The two core algorithms for recommender systems are collaborative filtering and content-based.

The basic form of a recommender system is a $n_i$ x $n_j$ matrix, where,

Notice how both axes have swapped positions, when compared to a traditional machine learning dataset. Since recommender systems provide rankings, the data points at each position $y^{(i,j)}$ are a numerical rating, which allows them to be compared against each other.

Using Per-Item Features

When a recommender system needs to rank data, it is useful for the data to have extra details, which come in the form of additional features. For example, consider a movie recommendation system. Instead of the data just being various movie scores for each user, additional features could include genre, box office revenue, etc.

Additional features are treated as a vector $\vec x^{(i)}$ for each item in the dataset.

Defining the Cost Function

Defining the Collaborative Filtering Algorithm

Generalizing for Binary Labels

Mean Normalization

Implementing Collaborative Filtering in TensorFlow

Finding Related Items

Defining the Content-based Algorithm

Deep Learning for Content-based Filtering

Implementing Content-based Filtering in TensorFlow