The Data Mining Forum                             open-source data mining software data mining conferences Data Science for Social and Behavioral Analytics DSSBA 2022 data science journal
IMPORTANT: This is the old Data Mining forum.
I keep it online so that you can read the old messages.

Please post your new messages in the new forum: https://forum2.philippe-fournier-viger.com/index.php
 
where is the "MainTestApriori_saveToMemory.java"
Posted by: kobe
Date: December 10, 2013 06:43AM

hello, i have a question ,i down load spmf.zip,but i can't find the file "MainTestApriori_saveToMemory.java" in the package ca.pfv.SPMF.tests.there's a file named "MainTestApriori_saveToFile.java",are they the same one? Thank you for your answer!

Options: ReplyQuote
Re: where is the "MainTestApriori_saveToMemory.java"
Date: December 10, 2013 06:47AM

Hi,

Thanks for letting me know. The file was removed for some reasons. I will update the software to include it.

Here is the content of the file "MainTestApriori_saveToMemory. You can copy it and create the file:


public class MainTestApriori_saveToMemory {

	public static void main(String [] arg) throws IOException{

		String input = fileToPath("contextPasquier99.txt"winking smiley;
		String output = null;
		// Note : we here set the output file path to null
		// because we want that the algorithm save the 
		// result in memory for this example.
		
		double minsup = 0.4; // means a minsup of 2 transaction (we used a relative support)
		
		// Applying the Apriori algorithm
		AlgoApriori apriori = new AlgoApriori();
		Itemsets result = apriori.runAlgorithm(minsup, input, output);
		apriori.printStats();
		result.printItemsets(apriori.getDatabaseSize());
	}
	
	public static String fileToPath(String filename) throws UnsupportedEncodingException{
		URL url = MainTestApriori_saveToMemory.class.getResource(filename);
		 return java.net.URLDecoder.decode(url.getPath(),"UTF-8"winking smiley;
	}
}



Edited 1 time(s). Last edit at 12/10/2013 06:47AM by webmasterphilfv.

Options: ReplyQuote
Re: where is the "MainTestApriori_saveToMemory.java"
Posted by: kobe
Date: December 10, 2013 06:49AM

thanks!

Options: ReplyQuote


This forum is powered by Phorum and provided by P. Fournier-Viger (© 2012).
Terms of use.