Sunday, 12 April 2015

Week 4 Guiding Questions

What are some of the general challenges in building a web search engine?
– Scalability
– Low quality information and spams
– Dynamics of the Web

What is a crawler?
Crawler basically fetch and prepares pages for the indexer.

How can we implement a simple crawler?
1. Start with a set of “seed pages” in a priority queue
2. Fetch pages from the web
3. Parse fetched pages for hyperlinks; add them to the queue
4. Follow the hyperlinks in the queue

What is focused crawling?
Targeted crawling for example, crawl only for pages about automobiles.

What is incremental crawling?
Incremental or repeated crawling only crawls for updated pages to minimize resource overhead. 

What kind of pages should have a higher priority for recrawling in incremental crawling?
1. frequently updated pages 
2. frequently accessed pages

What can we do if the inverted index doesn’t fit in any single machine?
Store data on multiple machines. Process data in parallel. 

What’s the basic idea of Google File System (GFS)?
Basic idea is having distributed file system.

How does MapReduce work?
It takes the input and convert to separate clustered key value pairs. It will then 'map' key value pairs then collect/sort them by key value. It will then fed into 'reduce' function which will generate new key value pairs. 

What are the two key functions that a programmer needs to implement when programming with a MapReduce framework?
Map and Reduce

How can we use MapReduce to build an inverted index in parallel?
1. Map - count related words, array, doc id, etc
2. ReduceMap - cconcatenates all the input and put them together as single entry. 

What is anchor text? Why is it useful for improving search accuracy?
Anchor text describes a link to a page. It provides good evidence for matching the page that it is pointing to if you match the anchor text.

What is a hub page? What is an authority page?
Hub page is a directory page which allows you to see other possible related pages. Authority page to provide some additional score to say how likely a page is an authority.

What kind of web pages tend to receive high scores from PageRank?
The ones with more links receive high scores.

How can we interpret PageRank from the perspective of a random surfer “walking” on the web?
Average probability visiting page di

How exactly do you compute PageRank scores?
By computing the probability of going from dto dj

How does the HITS algorithm work?














What’s the basic idea of learning to rank?
Basic idea is fitting functions with training data (which already got some relevance judgments).

How can logistic regression be used to combine multiple features for improving ranking accuracy of a search engine?
First estimate Betas by maximizing the likelihood of training data. Once Betas are known, we can take Xi(Q,D) computed based on a new query and a new document to generate a score for D w.r.t. Q.

What is content-based information filtering?
– Look at what items U likes, and then check if X is similar
       Item similarity => content-based filtering

How can we use a linear utility function to evaluate a filtering system?
Example with coefficients (3-2) If you deliver a good item, you gain 3 and lose 2 but if you delivered a bad item, you gain 2 but lose 3. Deliver as many good articles as possible and minimize delivery of bad articles.

How should we set the coefficients in such a linear utility function?
It needs to be set depending on the specific application. (eg 3,-2) 

How can we extend a retrieval system to perform content-based information filtering?
• “Reuse” retrieval techniques to score documents
• Use a score threshold for filtering decision
• Learn to improve scoring with traditional feedback
• New approaches to threshold setting and learning

What is exploration-exploitation tradeoff?
Expolitation means what you learn from user so you don't deviate much which means not exploring further.

How does the beta-gamma threshold learning algorithm work?















What is the basic idea of collaborative filtering?
- Look at who likes X, and then check if U is similar
   User similarity => collaborative filtering

How does the memory-based collaborative filtering algorithm work?
storing all user information and when we are considering a particular user, we retrieve the relevant users and try to use the information of those users to predict the preference of this user. 

What is the “cold start” problem in collaborative filtering?
“cold start” problem happens if there no sufficiently large number of user preferences available.

Key Phrases/Concepts
- Scalability, efficiency
- Spam
- Crawler, focused crawling, incremental crawling
- Google File System (GFS)
- MapReduce
- Link analysis, anchor text
- PageRank, HITS
- Learning to rank, features, logistic regression
- Content-based filtering
- Collaborative filtering
- Beta-gamma threshold learning
- Linear utility
- User profile
- Exploration-exploitation tradeoff
- Memory-based collaborative filtering
- Cold start

Friday, 3 April 2015

Week 3 Guiding Questions

Given a table of relevance judgments in the form of three columns (query, document, and binary relevance judgments), how can we estimate p(R=1|q,d)?
We can estimate the probability by computing the total number of query and doc pair with R=1 over the total number of all related query and doc pair.









How should we interpret the query likelihood conditional probability p(q|d)?
It is interpreted as probability that a user who likes d would pose query q.

What is a Statistical Language Model?
- A probability distribution over word sequences
– p(“Today is Wednesday”) - 0.001
– p(“Today Wednesday is”) - 0.0000000000001
– p(“The eigenvalue is positive”) - 0.00001
- Context-dependent
- Can also be regarded as a probabilistic mechanism for “generating” text, thus also called a “generative” model

What is a Unigram Language Model?
Unigram Language Model involves generating text by generating each word INDEPENDENTLY thus allowing us to compute probabilities of all sequences of the words. 

How many parameters are there in a unigram language model?
The number of parameters depends on the number of vocabulary size provided.
Parameters: {p(wi )} p(w1 )+…+p(wN )=1 (N is voc. size)

How do we compute the maximum likelihood estimate of the Unigram Language Model (based on a text sample)?
Maximum likelihood estimate is basically the count of words in the document divided by the total number of words in the document or document length.




What is a background language model?
It represents frequency of words(eg. in english) in general.

What is a collection language model?
It represents frequency of words in a chosen collection (eg. computer science papers).

What is a document language model?
It represents frequency of words in a chosen document (eg. text mining paper).

Why do we need to smooth a document language model in the query likelihood retrieval model?
In order to assign a non zero probability for words which have not been observed in the document, we have to take away some probability weights from the words that are observed in the document to give the weighting to unseen words.

Smoothing a language model is an attempt to try to recover the model for the whole article. 

What would happen if we don’t do smoothing?
If there is no smoothing, for words which did not occur in the document, they will have zero probability which means there is no chance of sampling any word that is not in the document. 

When we smooth a document language model using a collection language model as a reference language model, what is the probability assigned to an unseen word in a document?
The probability assigned to an unseen word in a document will be proportional to the probability of the word in the collection. 

How can we prove that the query likelihood retrieval function implements TF-IDF weighting if we use a collection language model smoothing?











How does linear interpolation (Jelinek-Mercer) smoothing work? What is the formula?
The idea of Jelinek-Mercer smoothing is to get the maximum likelihood estimate and rely on collection language model where unobserved words will not have zero probability. Get the linear interpolation between the maximum likelihood estimate and the collection language model which is controlled by a "fixed" smoothing parameter number.

Jelinek-Mercer Smoothing formula






How does Dirichlet Prior smoothing work? What is the formula?
The idea of Dirichlet Prior(Bayesian) smoothing is to get the maximum likelihood estimate and rely on collection language model where unobserved words will not have zero probability. Get the linear interpolation between the maximum likelihood estimate and the collection language model which is controlled by a "dynamic" smoothing parameter number which will result to long documents having smaller coefficients which mean long documents will have less smoothing.

Dirichlet Prior(Bayesian) Smoothing formula




What are the similarity and difference between Jelinek-Mercer smoothing and Dirichlet Prior smoothing?
Similarity is they both use the maximum likelihood estimate and rely on collection and get the liner interpolation of both. The difference is that Jelinek-Mercer used "fixed" coefficient while Dirichlet Prior(Bayesian) uses "dynamic" coefficient as smoothing parameter number. 

What is relevance feedback?
Users make explicit relevance judgments on the initial results
(judgments are reliable, but users don’t want to make extra effort)

What is pseudo-relevance feedback?
Pseudo/Blind/Automatic Feedback
Top-k initial results are simply assumed to be relevant 
(judgments aren’t reliable, but no user activity is required)
Eg. Top 10 results will be assumed relevant.

What is implicit feedback?
User-clicked docs are assumed to be relevant; skipped ones non-relevant 
(judgments aren’t completely reliable, but no extra effort from users)

How does Rocchio work?
Rocchio is feedback for VSM. Moving of the query vector to the centroid of relevant documents and move away from the centroid of non-relevant documents. 

Why do we need to ensure that the original query terms have sufficiently large weights in feedback?
To avoid "overfitting" because the sample in feedback is relatively small sample and we do not overly trust the small sample and original query terms are most important as the user types in the original terms. 

What is the KL-divergence retrieval function?
Kullback-Leibler (KL) Divergence Retrieval Model is generalizing the frequency inside query likelihood into a language model. It measures divergence of two distributions, one is query model and the other is document language model smoothed by collection language model. 

How is it related to the query likelihood retrieval function?
Kullback-Leibler (KL) Divergence Retrieval Model is just generalizing the frequency inside query likelihood into a language model. KL is almost identical to the query likelihood retrieval function. 

What is the basic idea of the two-component mixture model for feedback?
The basic idea is to use the background language model to explain words so as to discriminate very common words which are usually not relevant. 

Key Phrases/Concepts
- p(R=1|q,d) ; query likelihood, p(q|d)
- Statistical Language Model; Unigram Language Model
- Maximum likelihood estimate
- Background language model, collection language model, document language model
- Smoothing of Unigram Language Models
- Relation between query likelihood and TF-IDF weighting
- Linear interpolation (i.e., Jelinek-Mercer) smoothing
- Dirichlet Prior smoothing
- Relevance feedback, pseudo-relevance feedback, implicit feedback
- Rocchio
- Kullback-Leiber divergence (KL-divergence) retrieval function
- Mixture language model