Information Retrieval

Information Retrieval 

1. SPIMI

2. Learning Weight




    1.1. Determine the term in D4, and D5 in the example, So Apply  SPIMI on the documents D1…….D5 is given? 

Apply SPIMI on the documents D1…….D5 

Question :

Determine the term in D4, and D5 in the example, So Apply SPIMI on the documents D1…….D5 given?

Solution:

There are the following terms for D4 and D5.

Terms for D4 = { T3 , T8 , T9 , T13 , T14 }

Terms for D5 = { T3 , T6 , T9 , T14 }

SPIMI on the documents D1……..D5.

Parsing:

D1  = { T1,T2,T3,T4,T5,T6   }

D2  = { T7,T3,T5,T8,T9,T6,T10   }

D3  = { T8,T6,T11,T9,T12,T3   }

B1

(InMemory)

 

Dictionary

 

Sorted Dictionary

T1 , D1

 

T1

à

D1

 

T1

à

D1

T2 , D1

 

T2

à

D1

 

T2

à

D1

T3 , D1

 

T3

à

D1,D2

 

T3

à

D1,D2

T4 , D1

 

T4

à

D1

 

T4

à

D1

T5 , D1

 

T5

à

D1,D2

 

T5

à

D1,D2

T6 , D1

 

T6

à

D1,D2

 

T6

à

D1,D2

T7 , D2

 

T7

à

D2

 

T7

à

D2

T3 , D2

 

T8

à

D2

 

T8

à

D2

T5 , D2

 

T9

à

D2

 

T9

à

D2

T8 , D2

 

T10

à

D2

 

T10

à

D2

T9 , D2

 

 

 

 

 

 

 

 

T6 , D2

 

 

 

 

 

 

 

 

T10 , D2

 

 

 

 

 

 

 

 

So write to disk

B1 Block

In the Dictionary column, we do have not to add repeated words and in Sorted Dictionary, we set values in sequence form.

Now we will parse B2

B2

(InMemory)

 

Dictionary

 

Sorted Dictionary

T8 , D3

 

T8

à

D3, D4

 

T3

à

D1

T6 , D3

 

T6

à

D3, D5

 

T6

à

D1

T11 , D3

 

T11

à

D3

 

T8

à

D1,D2

T9 , D3

 

T9

à

D3,D4,D5

 

T9

à

D1

T12 , D3

 

T12

à

D3

 

T11

à

D1,D2

T3 , D3

 

T3

à

D3,D4,D5

 

T12

à

D1,D2

T3 , D4

 

T13

à

D4

 

T13

à

D2

T8 , D4

 

T14

à

D4,D5

 

T14

à

D2

T9 , D4

 

 

 

 

 

 

 

 

T13 , D4

 

 

 

 

 

 

 

 

T14 , D4

 

 

 

 

 

 

 

 

T3 , D5

 

 

 

 

 

 

 

 

T6 , D5

 

 

 

 

 

 

 

 

T9 , D5

 

 

 

 

 

 

 

 

T14 , D5

 

 

 

 

 

 

 

 

 B2 Block

In the Dictionary column, we do have not to add repeated words and in Sorted Dictionary, we set values in sequence form.

So write to disk

Inverted Indexes  on  Disk

B1 Block

 

B2 Block

T1

à

D1

 

T3

à

D3,D4,D5

T2

à

D1

 

T6

à

D3,D4

T3

à

D1,D2

 

T8

à

D3,D4

T4

à

D1

 

T9

à

D3,D4,D5

T5

à

D1,D2

 

T11

à

D3

T6

à

D1,D2

 

T12

à

D3

T7

à

D2

 

T13

à

D4

T8

à

D2

 

T14

à

D4,D5

T9

à

D2

 

 

 

 

T10

à

D2

 

 

 

 

 Final Merging

Part   of     B1

 

Part   of     B2

T1

à

D1

 

T3

à

D3,D4,D5

T2

à

D1

 

T6

à

D3,D4

T3

à

D1,D2

 

T8

à

D3,D4

T4

à

D1

 

T9

à

D3,D4,D5

 

 

Final Block  - 1 ( AUB = B1 U B2)

B1

T1

à

D1

B1

T2

à

D1

B1, B2

T3

à

D1,D2,D3,D4,D5

B1

T4

à

D1

So write to disk

Part   of     B1( Refilled )

 

Part   of     B2

T5

à

D1,D2

 

T3

à

D3,D4,D5

T6

à

D1,D2

 

T6

à

D3,D4

T7

à

D2

 

T8

à

D3,D4

T8

à

D2

 

T9

à

D3,D4,D5

 

 

Final Block  - 2 ( AUB = B1 U B2)

B1

T5

à

D1, D2

B1, B2

T6

à

D1 , D2 , D3 , D5

B1

T7

à

D2

B1 , B2

T8

à

D2 , D3 , D4


So write to disk

Final  Block A

By ( Final Block 1 and Final Block 2) (A U B)

T1

à

D1

T2

à

D1

T3

à

D1,D2,D3,D4,D5

T4

à

D1

T5

à

D1, D2

T6

à

D1 , D2 , D3 , D5

T7

à

D2

T8

à

D2 , D3 , D4


Part   of     B1( Refilled )

 

Part   of     B2

T9

à

D2

 

T3

à

D3,D4,D5

T10

à

D2

 

T6

à

D3,D4

 

 

 

 

T8

à

D3,D4

 

 

 

 

T9

à

D3,D4,D5

 

Final  Block   3

 

Part   of     B2  ( Refilled )

T9

à

D2,D3,D4,D5

 

T11

à

D3

T10

à

D2

 

T12

à

D3

T11

à

D3

 

T13

à

D4

T12

à

D3

 

T14

à

D4,D5

T13

à

D4

 

 

 

 

T14

à

D4,D5

 

 

 

 

 

Final  Block

By ( Final Block 3 and Final Block (A) ) (A U B)

T1

à

D1

T2

à

D1

T3

à

D1,D2,D3,D4,D5

T4

à

D1

T5

à

D1, D2

T6

à

D1 , D2 , D3 , D5

T7

à

D2

T8

à

D2 , D3 , D4

T9

à

D2,D3,D4,D5

T10

à

D2

T11

à

D3

T12

à

D3

T13

à

D4

T14

à

D4,D5

 


 2.1. Learning Weight in Rank Values

  Discount  = J / R






So assume we have

rel = Judgment  &  log2 = Rank


Learning Weight in Rank | Learning |  Weight

Rank

Docid

Judgment

DCG

IDCG ( J /iRank Position)

NDCG

1

D11

3

3

3.00

3.00

3

D8

3

5

1.50

4.50

9

D51

3

6

1.00

5.50

2

D24

2

4

0.50

6.00

7

D72

2

5

0.40

6.40

8

D45

2

5

0.33

6.73

6

D19

1

5

0.14

6.88

4

D9

0

5

0.00

6.88

5

D123

0

5

0.00

6.88

10

D69

0

6

0.00

6.88

 

 

 

 

Sum = 6.87

Sum = 59.65




Post a Comment

0 Comments