I am making an application that will calculate consecutive items of all 2 sizes from one set of transactions. It is an application that input data as a data file (empty space delimited text file - with item encoded as an integer) and percentage, is given as an integer (like input 2 represents 2% ). The application will have output in a separate file, which is more than 2% of all transactions (where 2% is the percentage given in the input) in each pair of transactions (represented by a line in a transaction file) Appears together in ). Each pair of items in a line in the output file will meet with their support (the number of transactions where they appear), also that the application (on the screen in the file) the duration of the output (required to perform the task) time) .
Data should be like a file
55 22 33 123 231 414 21 43 432 435 231 4324 534 22 21 33 123 231 534 666 222 ...
Each line is called a transaction and the input file contains thousands of transactions. I'm thinking of using the first data mining rule to find all the single numbers, whose frequency is more than 2% in each transaction, and then make pairs for each transaction, and eventually comparing each pair And generate output files.
Someone has some idea or code for this, please help, if you have code for it (better Java) that will be very helpful Thanks a lot.
This is one way to calculate integers.
public class IntCount {public static zero main (string [] args) {count ("123 234 456 678 78 9 234 234 123"); } Public static zero calculation (string transaction lane) {string [] parts = transactionLine.split (""); Maps & lt; String, integer & gt; Hashtable = new hashmap & lt; String, integer & gt; (); // Duplicate (strings: parts) for Mozilla {if (hashtable.gates) == faucet) hashtable.products (S, 1); Other hashtable.poots (s, hashtables.Tits + 1); } For (strings: hashtable.kitset ()) {System.out.println ("s:" + s + "count:" + hashtable.Tets)); }}}
Now you can start working through determining 2% part.
Comments
Post a Comment