本文整理汇总了Java中ca.pfv.spmf.algorithms.sequentialpatterns.goKrimp.DataReader类的典型用法代码示例。如果您正苦于以下问题:Java DataReader类的具体用法?Java DataReader怎么用?Java DataReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataReader类属于ca.pfv.spmf.algorithms.sequentialpatterns.goKrimp包,在下文中一共展示了DataReader类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runAlgorithm
import ca.pfv.spmf.algorithms.sequentialpatterns.goKrimp.DataReader; //导入依赖的package包/类
@Override
public void runAlgorithm(String[] parameters, String inputFile, String outputFile) throws IOException {
// file for sensitive
String labelFilePath = parameters[0];
if (labelFilePath == null) {
labelFilePath = "";
} else {
File file = new File(inputFile);
if (file.getParent() == null) {
labelFilePath = parameters[0];
} else {
labelFilePath = file.getParent() + File.separator
+ parameters[0];
}
}
DataReader d = new DataReader();
AlgoGoKrimp g = d.readData_SPMF(inputFile, labelFilePath);
g.setOutputFilePath(outputFile); // if not set, then result will be
// printed to console
g.gokrimp();
}
示例2: main
import ca.pfv.spmf.algorithms.sequentialpatterns.goKrimp.DataReader; //导入依赖的package包/类
@Test
public void main() {
NoExceptionAssertion.assertDoesNotThrow(() -> {
String inputDatabase = "test_goKrimp.dat"; // the database
// String inputLabelFile = "test_goKrimp.lab"; // the label file
String inputLabelFile = ""; // use this if no label file
String output = ".//outputK.txt"; // the path for saving the frequent itemsets found
DataReader d = new DataReader();
//GoKrimp g=d.readData(inputDatabase, inputLabelFile);
AlgoGoKrimp g = d.readData_SPMF(inputDatabase, inputLabelFile);
//g.printData();
g.setOutputFilePath(output); // if not set, then result will be printed to console
g.gokrimp();
});
}
示例3: main
import ca.pfv.spmf.algorithms.sequentialpatterns.goKrimp.DataReader; //导入依赖的package包/类
@Test
public void main() {
NoExceptionAssertion.assertDoesNotThrow(() -> {
String inputDatabase = "test_goKrimp.dat"; // the database
// String inputLabelFile = "test_goKrimp.lab"; // the label file
String inputLabelFile = ""; // use this if no label file
DataReader d = new DataReader();
//GoKrimp g=d.readData(inputDatabase, inputLabelFile);
AlgoGoKrimp g = d.readData_SPMF(inputDatabase, inputLabelFile);
//g.printData();
g.gokrimp();
});
}
示例4: mineGoKrimpSequencesSPMF
import ca.pfv.spmf.algorithms.sequentialpatterns.goKrimp.DataReader; //导入依赖的package包/类
/**
* @deprecated gives slightly different results to reference implementation
*/
@Deprecated
public static LinkedHashMap<Sequence, Double> mineGoKrimpSequencesSPMF(final File dataset, final File saveFile)
throws IOException {
final DataReader d = new DataReader();
final AlgoGoKrimp g = d.readData_SPMF(dataset.getAbsolutePath(), "");
// g.printData();
g.setOutputFilePath(saveFile.getAbsolutePath());
g.gokrimp();
return readGoKrimpSequencesSPMF(saveFile);
}