10.11.2016 Views

Learning Data Mining with Python

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Recommending Movies Using Affinity Analysis<br />

The result is much more readable (there are still some issues, but we can ignore them<br />

for now):<br />

Rule #1<br />

Rule: If a person recommends Shawshank Redemption, The (1994), Pulp<br />

Fiction (1994), Silence of the Lambs, The (1991), Star Wars (1977),<br />

Twelve Monkeys (1995) they will also recommend Raiders of the Lost Ark<br />

(1981)<br />

- Confidence: 1.000<br />

Rule #2<br />

Rule: If a person recommends Silence of the Lambs, The (1991), Fargo<br />

(1996), Empire Strikes Back, The (1980), Fugitive, The (1993), Star<br />

Wars (1977), Pulp Fiction (1994) they will also recommend Twelve<br />

Monkeys (1995)<br />

- Confidence: 1.000<br />

Rule #3<br />

Rule: If a person recommends Silence of the Lambs, The (1991), Empire<br />

Strikes Back, The (1980), Return of the Jedi (1983), Raiders of the<br />

Lost Ark (1981), Twelve Monkeys (1995) they will also recommend Star<br />

Wars (1977)<br />

- Confidence: 1.000<br />

Rule #4<br />

Rule: If a person recommends Shawshank Redemption, The (1994), Silence<br />

of the Lambs, The (1991), Fargo (1996), Twelve Monkeys (1995), Empire<br />

Strikes Back, The (1980), Star Wars (1977) they will also recommend<br />

Raiders of the Lost Ark (1981)<br />

- Confidence: 1.000<br />

Rule #5<br />

Rule: If a person recommends Shawshank Redemption, The (1994), Toy<br />

Story (1995), Twelve Monkeys (1995), Empire Strikes Back, The (1980),<br />

Fugitive, The (1993), Star Wars (1977) they will also recommend Return<br />

of the Jedi (1983)<br />

- Confidence: 1.000<br />

Evaluation<br />

In a broad sense, we can evaluate the association rules using the same concept as for<br />

classification. We use a test set of data that was not used for training, and evaluate<br />

our discovered rules based on their performance in this test set.<br />

[ 76 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!