Content-Based Recommender Systems II Item Representation


Item that can be recommended to the user are represented by a set of features, also called attributes or properties. When each item is described by the same set of attributes, and there is a known set of values the attributes may take, the item is represent by means of structured data. In this case, many ML algorithms can be used to learn a user profile.

In most content-based filtering systems, item descriptions are textual features extracted from Web pages, emails news articles or product descriptions. Unlike structured data, there are no attributes with well-defined values. Textual features create a number of complications when learning a user profile, due to natural language ambiguity.

Semantic analysis and its integration in personalization models is one of the most innovative and interesting approaches proposed in literature to solve those problems. The key idea is the adoption of knowledge bases, such as lexicons or ontologies, for annotating items and repsenting profiles in order to obtain a "semantic" interpretation of the user information needs.

Keyword-based Vector Space Model

Vector Space Model (VSM) is a spatial representation of text documents. In that model, each document is represented by a vector in a n-dimensional space, where each dimension corresponds to a term from the overall vocabulary of a given document collection.

Formally, every document is represented as a vector of term weights, where each weight indicates the degree of association between the document and the item. Let $D = {d1,d2,\ldots, dN }$ denote a set of documents or corpus, and $T = {t1, t2,\ldots, tn}$ be the dictionary, that is to say the set of words in the corpus. T is obtained by applying some standard natural language processing operations, such as tokenization, stopwords removal, and stemming. Each document $dj$ is represented as a vector in a n dimensional vecto space, so $dj = {w{1j}, w{2j},\ldots, w{nj}}$, where $w{kj}$ is the weight for term $tk$ in document $dj$

There is two issues in this approach: weighting the terms and measuring the feature vector similarity. The most commonly used term weighting scheme.

Term Frequency Inverse Document Frequency (TF-IDF) weighting

In short: therms that occur frequently in one document(TF=term frequency), but rarely in the rest of the corpus(IDF = inverse document frequency), are more likely to be relevant to the topic of the document.

$TF-IDF(tk, dj) = TF(tk,dj) \log\frac{N}{n_k}$

where $N$ denotes the number of documents in the corpus, and $nk$ denotes the number of documents in the collection in which the term $tk$ occurs at least once.

$TF(tk, dj) = \frac{f{k,j}}{\max{z}f_{z,j}}$

where the maximum is computed over the frequencies $f{z,j}$ of all terms $tz$ that occur in document $d_j$. In order for the weights to fail in the [0,1] interval and for the documents to be represented by vector of equal length, here is the normalization:

$w{k,j} = \frac{TF-IDF(tk,dj)}{\sqrt{\sum{s=1}^{T}TF-IDF(ts,dj)^2}}$

Therefore, the similarity is defined as following:

$sim(di,dj) = \frac{\sum{k}w{ki}w{kj}}{\sqrt{\sum{k}w{ki}^2}\sqrt{\sum{k}w_{kj}^2}}$