本文整理汇总了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();
}
示例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();
});
}
示例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();
}