specify the conclusion attribute for w-apriori algorithm with rapidminer

asmahassani08asmahassani08 Member Posts: 31 Contributor II
edited December 2018 in Help

Hi,

I would like to find association rules in a dataset using rapidminer by applying the wapriori algorithm. I would like to have on the right side of rules a specific attribute.

For example, I have a dataset including attributes A, B and C. I would like to have C as a conclusion like:

if A, B then C/

if B then C

how can I force the wapriori algorithm to express a specific attribute as a result? how can I set this in rapidminer ? thanks

Answers

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn

    Hi @asmahassani08,

     

    Can you share your process and your entry example set, please ?

     

    thanks you,

     

    Regards,

     

    Lionel

  • asmahassani08asmahassani08 Member Posts: 31 Contributor II

    hi,

    i'm so sorry, i'm new with rapidminer and i can't know how to store and share my process and my data set.

    sorry for this trivial stack .  

  • asmahassani08asmahassani08 Member Posts: 31 Contributor II

    in my example, I want to conclude the influence of age, level and speciality on the category of the course in which a student is enrolled.
    age = 25, Specialty = computing, level = license -> category = computing
    age = 45, specialty = management, level = master -> category = computing

    age=35, speciality=economyfiance, level=phd -> category=management....
    so I want to have the course category as the result of the rule.
    in my process, I have a first operator to extract the data from the MySQL database (age, level, speciality and category) then a numerical to binominal operator and finally the w-apriori operator.

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn

    Hi again @asmahassani08

     

    Here I propose some response elements : 

    1. Given the description of your study, have you try the FP-Growth operator associated to Create Association Rules operator like this :

     

    Association_rules.png

    After executing the process, you go to the results panel, go to the Association rules tag et here you can filter your results by conclusion.

    It looks like that : 

    Association_rules_2.png

     

    2.An other way :   have you try the Decision tree operator and/or the Linear Discriminant Analysis instead of 

    w-apriori operator ? Maybe these models can answer to your need...

     

    3.if 1. and 2. don't answer to your need, can you share your dataset :

    a. Insert a Write Excel operator after your extracting SQL operator

    b. Set a path where the excel file will be saved.

    c. Share this file by clicking on Sélect. files in this reply page : 

    Association_rules_3.png

    Regards,

     

    Lionel

     

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    @lionelderkrikor has some excellent suggestions here.  I'll reinforce what he has noted, which is that typically with association rules you are not trying to "force" any particular outcome.  You may be better off taking the outcome you are interested and using "Set Role" to turn it into a label, and then you can use traditional supervised learning algorithms to generate predictive models to see relationships specifically to your outcome of interest ("C").  You could even reformaulte your possible outcomes into a binominal (all outcomes are either "C" or "not "C") and that will open up an even wider range of predictive techniques for you to use.

     

     

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.