當前位置: 首頁>>代碼示例>>Java>>正文


Java AlgoFHSAR類代碼示例

本文整理匯總了Java中ca.pfv.spmf.algorithms.associationrules.fhsar.AlgoFHSAR的典型用法代碼示例。如果您正苦於以下問題:Java AlgoFHSAR類的具體用法?Java AlgoFHSAR怎麽用?Java AlgoFHSAR使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AlgoFHSAR類屬於ca.pfv.spmf.algorithms.associationrules.fhsar包,在下文中一共展示了AlgoFHSAR類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: runAlgorithm

import ca.pfv.spmf.algorithms.associationrules.fhsar.AlgoFHSAR; //導入依賴的package包/類
@Override
public void runAlgorithm(String[] parameters, String inputFile, String outputFile) throws IOException {
	double minsup = getParamAsDouble(parameters[0]);
	double minconf = getParamAsDouble(parameters[1]);
	// file for sensitive
	String sarFile = parameters[2];

	File file = new File(inputFile);
	String sarFileFullPath;
	if (file.getParent() == null) {
		sarFileFullPath = sarFile;
	} else {
		sarFileFullPath = file.getParent() + File.separator + sarFile;
	}

	// STEP 1: Applying the FHSAR algorithm to hide association rules
	AlgoFHSAR algorithm = new AlgoFHSAR();
	algorithm.runAlgorithm(inputFile, sarFileFullPath, outputFile,
			minsup, minconf);
	algorithm.printStats();
}
 
開發者ID:matfax,項目名稱:spmf,代碼行數:22,代碼來源:DescriptionAlgoFHSAR.java

示例2: main

import ca.pfv.spmf.algorithms.associationrules.fhsar.AlgoFHSAR; //導入依賴的package包/類
@Test
public void main() {
    NoExceptionAssertion.assertDoesNotThrow(() -> {

        String input = "contextIGB.txt"; // the database
        String inputSAR = "sar.txt"; // the sensitive association rules that we want to hide
        String output = ".//output.txt";  // the path for saving the transformed database
        double minsup = 0.5;
        double minconf = 0.60;

        // STEP 1: Applying the FHSAR algorithm to hide association rules
        AlgoFHSAR algorithm = new AlgoFHSAR();
        algorithm.runAlgorithm(input, inputSAR, output, minsup, minconf);
        algorithm.printStats();

    });
}
 
開發者ID:matfax,項目名稱:spmf,代碼行數:18,代碼來源:MainTestFHSAR.java

示例3: main

import ca.pfv.spmf.algorithms.associationrules.fhsar.AlgoFHSAR; //導入依賴的package包/類
public static void main(String [] arg) throws IOException{
	
	String input = fileToPath("contextIGB.txt");  // the database
	String inputSAR = fileToPath("sar.txt");  // the sensitive association rules that we want to hide
	String output = "C://patterns//new_database.txt";  // the path for saving the transformed database
	double minsup = 0.5;
	double  minconf = 0.60;
	
	// STEP 1: Applying the FHSAR algorithm to hide association rules
	AlgoFHSAR algorithm = new AlgoFHSAR();
	algorithm.runAlgorithm(input, inputSAR, output, minsup, minconf);
	algorithm.printStats();

}
 
開發者ID:YinYanfei,項目名稱:CadalWorkspace,代碼行數:15,代碼來源:MainTestFHSAR.java


注:本文中的ca.pfv.spmf.algorithms.associationrules.fhsar.AlgoFHSAR類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。