-
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
-
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.
-
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
-
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.
-
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
-
Forum Rules