DMA/L/z2

From WikiZMSI

< DMA | L

In class

  • Unzip the file transactionsApriori.zip and read its content in MATLAB (use 'load' command).
  • Get familiar with the data format according to which shopping transactions are kept.
  • Get familiar with the java.util.Hashmap type (from MATLAB's command line test methods: put, get, containsKey, keySet, etc.)
  • Implement as a script the first part of the Apriori algorithm: finding frequent sets (for given minSupp parameter). It is convenient to return the frequent sets as a cell array of hash maps.
  • Implement as a script the second part of the Apriori algorithm: generation of association rules (using as input the result from the previous script).

At home

  • Carry out 9 experiments for all (minSupp, minConf) pairs, where minSupp = 0.2, 0.15, 0.1; and minConf = 0.6, 0.8, 0.9. Apart from the list of rules, the result of each experiment should also be a plot of rules (command: scatter) marked as points in the supp x conf coordinate system.
  • Create a script taking the list of rules as an input and searching for equivalances among them (implication working in both directions), e.g.: if a -> b and also b -> a, then a <-> b. For each equivalance being displayed, write out the condifences for both directions of implication. Do the search for equivalances for all 9 experiments.
  • To speed up the checking process of your work at next lab (to avoid rerunning of 9 experiments), save the results of your homework in MATLAB into .mat files (using 'save' command). Note that the plots can also be assigned to variables and saved.