当前位置: 首页>>代码示例>>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;未经允许,请勿转载。