Hw2solution - Homework 2 for Artificial Intelligence Class(15-381 Sample Solution Question 1 Information Retrieval(Vector Space Model(1 The answers

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 2 for Artificial Intelligence Class (15-381) Sample Solution Question 1. Information Retrieval (Vector Space Model): (1) The answers of this question are not unique. Any set of six non-stop words that are related to the topic (successful business) and appear frequently can be a good answer, e.g., “succeed, business, knowledge, millionaire, revenue, rocket”, “succeed, business, knowledge, millionaire, revenue, success”, “knowledge, millionaire, revenue, garage, rocket, home- based”, etc. (2) Vector for each text: d 1 : (2,0,0,0,0,1,0,0,1,0) d 2 : (0,0,0,2,1,0,1,0,0,0) d 3 : (0,0,0,1,0,0,0,0,0,0) d 4 : (1,1,0,0,0,0,0,0,0,1) d 5 : (2,2,0,0,0,0,0,1,0,0) d 6 : (0,0,0,1,0,0,0,0,0,0) (3) Vector for each query: q 1 : (1,1,0,0,0,0,0,1,0,0) q 2 : (1,0,0,1,1,0,0,0,0,0) (4) Query 1: Sdot(d1, q1) = (2,0,0,0,0,1,0,0,1,0)·(1,1,0,0,0,0,0,1,0,0)=2, Scos(d1, q1) = Sdot(d1, q1)/(|q1|·|d1|) = 0.471 Sdot(d2, q1) = (0,0,0,2,1,0,1,0,0,0)·(1,1,0,0,0,0,0,1,0,0)=0, Scos(d2, q1) = Sdot(d2, q1)/(|q1|·|d2|) = 0 Sdot(d3, q1) = (0,0,0,1,0,0,0,0,0,0)·(1,1,0,0,0,0,0,1,0,0)=0, Scos(d3, q1) = Sdot(d3, q1)/(|q1|·|d3|) = 0 Sdot(d4, q1) = (1,1,0,0,0,0,0,0,0,1)·(1,1,0,0,0,0,0,1,0,0)=2, Scos(d4, q1) = Sdot(d4, q1)/(|q1|·|d4|) = 0.667 Sdot(d5, q1) = (2,2,0,0,0,0,0,1,0,0)·(1,1,0,0,0,0,0,1,0,0)=5, Scos(d5, q1) = Sdot(d5, q1)/(|q1|·|d5|) = 0.962 Sdot(d6, q1) = (0,0,0,1,0,0,0,0,0,0)·(1,1,0,0,0,0,0,1,0,0)=0, Scos(d6, q1) = Sdot(d6, q1)/(|q1|·|d6|) = 0 For both similarity, Document 5 best matches Query 1. Query 2: Sdot(d1, q2) = (2,0,0,0,0,1,0,0,1,0)·( 1,0,0,1,1,0,0,0,0,0)=2, Scos(d1, q2) = Sdot(d1, q2)/(|q2|·|d1|) = 0.471 Sdot(d2, q2) = (0,0,0,2,1,0,1,0,0,0)·( 1,0,0,1,1,0,0,0,0,0)=3,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Scos(d2, q2) = Sdot(d2, q2)/(|q2|·|d2|) = 0.707 Sdot(d3, q2) = (0,0,0,1,0,0,0,0,0,0)·( 1,0,0,1,1,0,0,0,0,0)=1, Scos(d3, q2) = Sdot(d3, q2)/(|q2|·|d3|) = 0.577 Sdot(d4, q2) = (1,1,0,0,0,0,0,0,0,1)·( 1,0,0,1,1,0,0,0,0,0)=1, Scos(d4, q2) = Sdot(d4, q2)/(|q2|·|d4|) = 0.333 Sdot(d5, q2) = (2,2,0,0,0,0,0,1,0,0)·( 1,0,0,1,1,0,0,0,0,0)=2, Scos(d5, q2) = Sdot(d5, q2)/(|q2|·|d5|) = 0.385 Sdot(d6, q2) = (0,0,0,1,0,0,0,0,0,0)·( 1,0,0,1,1,0,0,0,0,0)=1, Scos(d6, q2) = Sdot(d6, q2)/(|q2|·|d6|) = 0.577
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/02/2009 for the course CS 4365 taught by Professor Vincent during the Spring '09 term at Universidad Torcuato Di Tella.

Page1 / 8

Hw2solution - Homework 2 for Artificial Intelligence Class(15-381 Sample Solution Question 1 Information Retrieval(Vector Space Model(1 The answers

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online