US and Worldwide: +1 (866) 660-7555
Results 1 to 5 of 5

Thread: Extract association rules Weka & get ROC curve datapoints Weka

  1. #1
    Join Date
    Jul 2012
    Posts
    3

    Default Extract association rules Weka & get ROC curve datapoints Weka

    Hi,

    I am using Weka (version 3.6.7) to make some predictions if something is GOOD or BAD. I am applying different models, such as Decision Table, J48 and OneR. When I use Decision Table, for example, it states that there are 539 rules used. (I use a large dataset). How can I extract does rules or display these rules? Just to gain insight into the dataset.

    Another question:
    When I display the ROC curve, how am I able to get the datapoints which are correctly classified as, in my case, good (vertical line on the Y-axis) and the datapoints that are correctly classified as BAD (horizontal line on top right of the graph).


    Thanks a million!

    Astrid

  2. #2
    Join Date
    Aug 2006
    Posts
    1,067

    Default

    The "displayRules" (-R from command line) option for DecisionTable will output the rules in table format.

    ROC curves generated in Weka show true positive and false positive rates for points corresponding to different thresholds on the predicted probability for the positive class. Each point on the curve can be considered as a different classifier because it corresponds to a different threshold. So, in order to get the instances that are correctly classified you'd need to choose a point on the curve and then use the ThresholdSelector (with user supplied threshold) to learn that particular classifier. Then you can turn on the option in the Explorer to output predictions and see which instances are correctly classified.

    Cheers,
    Mark.

  3. #3
    Join Date
    Jul 2012
    Posts
    3

    Default

    Thanks Mark! Now I understand the ROC curve part.

    However, I am not used to work with the command line very well. So I do not know how to use the -R, can you give me an example? For example, when I tried the following: "java -Xmx3g jar weka.jar weka.classifiers.rules.DecisionTable -t data/myfile.arff -i -R" then weka will start but after starting the Explorer it stops because of a NullPointerException in the main, which seems a bit odd. How should the command line suppost to look like?

    Or is there maybe another way to get the rules?

    Best,
    Astrid

  4. #4
    Join Date
    Aug 2006
    Posts
    1,067

    Default

    The option for output of rules is available in the GUI as well - it's just called "displayRules" in the editor dialog for DecisionTable. I'm not too sure how or why you got a null pointer exception though.

    Cheers,
    Mark.

  5. #5
    Join Date
    Jul 2012
    Posts
    3

    Default

    Found it! Thanks! I overlooked it.

    Best,
    Astrid

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •