It is not clear to me how to calculate similarity between two products from the example.
How do they calculate that?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communityIt is not clear to me how to calculate similarity between two products from the example.
How do they calculate that?
Note the instruction is to view the utility matrix as boolean. That is if it is positive, then view it as $1$ and $0$ otherwise.
Example, to compute the Jaccard similairty between $a$ and $b$.
Consider the component of $a$ to be $(1,0,1,1,0,1)$ and component of $b$ to be $(0,1,1,0,1,1)$.
To compute $|a \cap b|$, look at how many position where both of the values are $1$. This is satisfied at the third and the sixth coordinate. Hence the value is $2$.
To compute $|a \cup b|$, look at how many position where at least one of the value is $1$. This is satisfied at every position. Hence the value is $6$.