public void generateAssociations() {
		
		//this populates all the transactions
		readInputFile(datafile);
		
		//return all items that meet required min_support.  
		//We don't need this list to generated association rules as it only contains one element 
		//but we add it because we need to print it as required by the project.
		List<Itemset> initialList = initilizeLargeItemSet(min_support);	
		largeItemSets.addAll(initialList);
		seed = initialList;
		int k = 2;
		
		while (!seed.isEmpty())
		{
			List<Itemset> candidateList = aprioriGen(seed, k);
			
			//calculate the support for each element in candidateList
			//and remove any element that doesn't contain the required support
			List<Itemset> removeList = new ArrayList<Itemset>();
			for (Itemset is : candidateList) {
				double itemset_support = calculateSupport(is);
				if (itemset_support < min_support)
					removeList.add(is);
				else 
					is.setSupport(itemset_support);
			}
			
			candidateList.removeAll(removeList);
		
			//set the seed to the candidateList for the next iteration
			seed = candidateList;
			
			//add all the cadidates to the largeItemSets since they meeting the minimum support
			largeItemSets.addAll(candidateList);
			
			k++;
		}
		
		//evaluate all the association rules
		for (Itemset is : largeItemSets) {
			if ((is.getItems().size()) > 1)
				generateRules(is, min_conf);
		}
		
		Collections.sort(largeItemSets);
		Collections.sort(rules);
		
		System.out.println("==Large itemsets (min_sup=" + min_support + ")");
		for (Itemset is : largeItemSets) 
			System.out.println(is.toString() + " Support: " + String.format("%.4f", is.getSupport()));
		
		System.out.println("==High-confidence association rules (min_conf=" + min_conf + ")");
		for (Rule rule : rules) {
			System.out.println(rule.toString() + " (Support: " + String.format("%.4f", rule.getSupport()) + 
					" , Confidence: " + String.format("%.4f", rule.getConfidence()) + ")");
		}
		System.out.println(largeItemSets.size() + " large itemsets found!");
		System.out.println(rules.size() + " rules found!");
		
		generateOutput();
	}