Download Apriori Algorithm Source Code In C

Active2 years, 5 months ago

Here you can download a fast, trie-based, command-line implementation of the APRIORI algorithm for Linux and Windows platforms. The code is written in standard C++ in object-oriented manner. It uses STL possibilities, if that does not deteriorate the efficiency. The code can be freely used for research purposes.

$begingroup$

I have this algorithm for mining frequent itemsets from a database. In that problem, a person may acquire a list of products bought in a grocery store, and he/she wishes to find out which product subsets tend to occur 'often', simply by coming out with a parameter of minimum support $mu in [0, 1]$, which designates the minimum frequency at which an itemset appeares in the entire database in order to be deemed 'frequent'.

What comes to demonstration data, I copied this data set from the book 'Introduction to Data Mining' by Tan, Steinbach, Kumar:

and I used the same minimum support of 0.2.

Now, here is the code:

AprioriFrequentItemsetGenerator.java:

FrequentItemsetData.java:

Demo.java:

Any chance of optimizing performance of the algorithm? What about overall design?

Download Apriori Algorithm Source Code In C
coderodde
coderoddecoderodde
16.3k6 gold badges43 silver badges137 bronze badges
$endgroup$

1 Answer

$begingroup$

I'm not really a professional or an expert when it comes to coding, in fact I only know the basics of java since I'm still studying, but as an opinion, I love how you took advantage of Object Oriented Programming when you made this Apriori algorithm. You made use of Sets,Lists and HashMaps to make things easier especially when dealing with lots of transactions. You also used Generics!

Cpu Scheduling Algorithm Source Code In C

Although I've noticed that you can still make this code shorter:

by:

Actually, I'm doing a project which includes Apriori algorithm. I've tried making one but I didn't really liked my code because it was not optimized and clean so I decided to search for Apriori codes to compare and learn from and luckily, I met this one! I really liked the idea, it can be understood easily and the code is clean!

CoderCoder

Source Code In C Language

$endgroup$

C4.5 Algorithm Source Code In Java

Not the answer you're looking for? Browse other questions tagged javaalgorithmdata-mining or ask your own question.