The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Output rules
Hello,
I am using RM in java and I am generating associating rules using FPGrowth. My question is how to parse the resulting rules as in the Gui manner, I wan to get for each rule its support, its confidence, its lift....Is it possible to have the rules in a table as in the gui so as to seperate the premises and the conclusions.
Here is the XML file I used :
[att1= val1] --> [att2= val2] (confidence: 1.000)
And I want to see the values of the support, lift... and not only the confidence.
Thanks in advance.
I am using RM in java and I am generating associating rules using FPGrowth. My question is how to parse the resulting rules as in the Gui manner, I wan to get for each rule its support, its confidence, its lift....Is it possible to have the rules in a table as in the gui so as to seperate the premises and the conclusions.
Here is the XML file I used :
and here is the java code:
<operator name="Root" class="Process" expanded="yes">
<operator name="CSVExampleSource" class="CSVExampleSource">
<parameter key="filename" value="...attributes.csv"/>
</operator>
<operator name="Nominal2Binominal" class="Nominal2Binominal">
</operator>
<operator name="FPGrowth" class="FPGrowth">
<parameter key="min_support" value="0.1"/>
</operator>
<operator name="AssociationRuleGenerator" class="AssociationRuleGenerator">
<parameter key="min_confidence" value="0.7"/>
</operator>
</operator>
With this code, I can see the generated rules in this manner:
RapidMiner.init(false, true, true, true);
String modelFile = "operator.xml";
File processFile = new File(modelFile);
Process process;
try {
process = RapidMiner.readProcessFile(processFile);
IOContainer input = new IOContainer();
IOContainer output = process.run(input);
.....
[att1= val1] --> [att2= val2] (confidence: 1.000)
And I want to see the values of the support, lift... and not only the confidence.
Thanks in advance.
0
Answers
The following generates data and makes association rules, which are filed and parsed into an example set. You will get log nasties about unattached files, which you can ignore. Have fun!
I tried to run a java process using the XML file that you posted in your reply, the resulting rules are now in a csv file, but still there is only the confidence near each rule. I want to ouput also the support, the lift...
in your XML file I noticed this : What do you mean by att3 and why should I replace the confidence, I want to keep it and to see the other parameters too.
Is there any way to recup the rules in a java table using the class Rule for example?
Thank you in advance
If you want to get at the stuff beyond Premise,Conclusion, and Confidence you'll need to delve deeper than the GUI allows, but you can do that with a Groovy script, like this...