The formula for comparison is dot product divided by product of vector lengths
In the example for two sets Book and DVD
- Book – (1,1,1) – Set A consider it as (A1, A2, A3)
- DVD – (1,0,0) – Set B consider it as (B1, B2, B3)
- (A1.B1 + A2.B2 + A3.B3) /sqrt((A1 square + A2 Square + A3 Square)( B1 square + B2 Square + B3 Square))
- (1)/sqrt((3).sqrt(1)
- 1 / 1.732
- 0.577
Item to Item Comparison based on customer ratings
The formula for comparison is dot product divided by product of vector lengths
In the example for two sets Book and DVD
- Book – (4,3,5) – Set A consider it as (A1, A2, A3)
- DVD – (1,0,0) – Set B consider it as (B1, B2, B3)
- (A1.B1 + A2.B2 + A3.B3) /sqrt((A1 square + A2 Square + A3 Square)( B1 square + B2 Square + B3 Square))
- (4)/sqrt((16+9+25).sqrt(1)
- 4/7.07
- 0.565
Happy Learning!!!
No comments:
Post a Comment