Apriori in Python – Step 3.) Visualize Apriori Results

with 8 Comments

Visualize the Apriori Results

After the model is trained , it is super easy to visualize the results.

Users can see the results with one line of code.

# Import the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

# Import Dataset 
dataset = pd.read_csv(‘apriori_data2.csv’, header = None)
records = [] for i in range(0, 11):
records.append([str(dataset.values[i,j]) for j in range(0, 10)])

# Train Apriori Model
from apyori import apriori
rules = apriori(records, min_support = 0.003, min_confidence = 0.2, min_lift = 3, min_length = 2)

# Visualising the results
results = list(rules)

Other Sections on Apriori :

Step 1.) Import Libraries and Import Dataset 

Step 2.) Train a Apriori Model 

Step 3.) Visualize Apriori Results

Other Topics – Multivariate Analysis : 
Other Topics – Association Rule : 
  • Apriori
  • Eclat
Other Topics – Artifical Inteligent : 

8 Responses

  1. Afonso
    | Reply

    Hi, I can’t visualising the results. It is not showing products. I am using Spyder 3.6

  2. jobs tips
    | Reply

    Its not my first time to pay a quick visit this site, i am visiting this web site dailly and take good facts from here daily.

  3. online education programs
    | Reply

    This is a really good tip particularly to those fresh to the blogosphere. Simple but very precise info… Thanks for sharing this one. A must read post!

  4. online degrees
    | Reply

    hi!,I really like your writing very much! share we communicate more approximately your post on AOL? I need a specialist in this space to solve my problem. May be that’s you! Looking forward to peer you.

  5. career guidance
    | Reply

    I’m more than happy to uncover this great site. I wanted to thank you for ones time for this particularly fantastic read!! I definitely loved every bit of it and I have you saved as a favorite to look at new stuff on your blog.

  6. importance of education
    | Reply

    Hello, i feel that i noticed you visited my website so i came to return the favor?.I am trying to in finding things to improve my web site!I suppose its adequate to use some of your concepts!!

  7. online education degrees
    | Reply

    Wow, this post is nice, my younger sister is analyzing such things, thus I am going to tell her.

  8. financial advice for young people
    | Reply

    My coder is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s tryiong none the less. I’ve been using Movable-type on a variety of websites for about a year and am worried about switching to another platform. I have heard excellent things about blogengine.net. Is there a way I can import all my wordpress content into it? Any help would be really appreciated!

Leave a Reply