How use Apriori in command line (in Windows)

335 views
Skip to first unread message

Arash Haydaryan

unread,
Aug 18, 2014, 5:52:14 AM8/18/14
to wekamooc...@googlegroups.com
Hi, I need to run the Apriori associative rule from command line, I need to know the parameters for passing a file to it (lets say source.arff) and store the result in a file (lets say results.txt). How can I define the input and output file for the following command in command line :
weka.associations.Apriori -N 500 -T 0 -C 0.7 -D 0.05 -U 1.0 -M 0.1 -S -1.0 -c -1
Thanks  

Arash Haydaryan

unread,
Aug 18, 2014, 6:04:26 AM8/18/14
to wekamooc...@googlegroups.com
Well I got it how can I define the output and input, the problem is that I get the out of memory error. I modified the ini file and changed the max heap size to 2048, but I still get this error, any one knows how can I solve this issue ? (Im using Weka 3.7 in 64 bits windows 7 )
Thanks


--
You received this message because you are subscribed to a topic in the Google Groups "WekaMOOC-general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wekamooc-general/e1pnxhynac0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wekamooc-gener...@googlegroups.com.
To post to this group, send email to wekamooc...@googlegroups.com.
Visit this group at http://groups.google.com/group/wekamooc-general.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wekamooc-general/c39fc08c-edfa-4cdb-ae3f-cb8ad63eab98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Arash Heidarian
Software Engineer and Software Architect 

Bhoomin Pandya

unread,
Aug 19, 2014, 5:26:38 AM8/19/14
to wekamooc...@googlegroups.com
Hi Arash:

The Heap Size increase has to be gradual or slow. JAVA_OPTS = "-Xmx2048M" may not work in first try.

Plugin your path to training set after -t (eg. c:\WEKA..\dataset\training.arff) and test set after -T. Java syntax uses quotes for path "C:\arash haidariyan\dataset\test.arff" if there's a white space in the path.

More details are on
http://weka.wikispaces.com/Primer#basic
http://weka.wikispaces.com/Saving+and+loading+models

Cheers,
Bhoomin Pandya

Arash Haydaryan

unread,
Aug 19, 2014, 7:59:22 PM8/19/14
to wekamooc...@googlegroups.com
Hi Bhoomin, 
I tried all alternatives to change the heap size (modifying .ini file and changing Java configs), and no one worked, but once I set the max heap size in command line (as below), it works:

java -Xmx7168m weka.associations.Apriori -N 100 -T 0 -C 0.1 -D 0.05 -U 1.0 -M 0.001 -S -1.0 -A -c 1 -t inputs/binary1.arff > outputs/1.txt

of course it takes 7 GB of my RAM and my PC is exploding :), but after 14 hours, WEKA could give me nice rules :)

Thanks,
Arash 




--
You received this message because you are subscribed to a topic in the Google Groups "WekaMOOC-general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wekamooc-general/e1pnxhynac0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wekamooc-gener...@googlegroups.com.
To post to this group, send email to wekamooc...@googlegroups.com.
Visit this group at http://groups.google.com/group/wekamooc-general.

For more options, visit https://groups.google.com/d/optout.

Bhoomin Pandya

unread,
Aug 20, 2014, 12:40:04 AM8/20/14
to wekamooc...@googlegroups.com
Congratulations Arash :) 7 Gigs RAM usage and 14 hrs of Running Algo ? Large number of Rules?

I wish to know - if possible - how you are dealing with so many Association Rules?

Best Regards,
Bhoomin

On Monday, August 18, 2014 3:22:14 PM UTC+5:30, Arash Haydaryan wrote:

Arash Haydaryan

unread,
Aug 22, 2014, 3:34:48 AM8/22/14
to wekamooc...@googlegroups.com
Hi Bhoomin, 
Probably it is a matter of interest. In my work, Im trying to find rules which helps me to sell the goods in supermarket which have not been sold so frequent, and for this purpose I want to use the complementary goods which are quite popular. So you dont care about a rule if it has the least sold item in the right side and doesnt have  any popular good on its left side. It helps to draw a proper planogram. That is my approach in general view :)   


--
You received this message because you are subscribed to a topic in the Google Groups "WekaMOOC-general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wekamooc-general/e1pnxhynac0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wekamooc-gener...@googlegroups.com.
To post to this group, send email to wekamooc...@googlegroups.com.
Visit this group at http://groups.google.com/group/wekamooc-general.

For more options, visit https://groups.google.com/d/optout.

Bhoomin Pandya

unread,
Aug 23, 2014, 1:53:48 AM8/23/14
to wekamooc...@googlegroups.com
Arash,

Many Thanks for the insight. The planogram representation is an excellent choice. I do not have a planogram software as yet. I am curious to know if
you can use confidence, support, antecedent and consequent etc.parameters on one plot to select best rules in the planogram?

Cheers,
Bhoomin Pandya  


On Monday, August 18, 2014 3:22:14 PM UTC+5:30, Arash Haydaryan wrote:
Reply all
Reply to author
Forward
0 new messages