Example usage for org.apache.mahout.classifier.df DFUtils listOutputFiles

List of usage examples for org.apache.mahout.classifier.df DFUtils listOutputFiles

Introduction

In this page you can find the example usage for org.apache.mahout.classifier.df DFUtils listOutputFiles.

Prototype

public static Path[] listOutputFiles(FileSystem fs, Path outputPath) throws IOException 

Source Link

Document

Return a list of all files in the output directory

Usage

From source file:guipart.view.Utils.java

static void rfTestDirectory(Path outPath, DataConverter converter, DecisionForest forest, Dataset dataset,
        Collection<double[]> results, Random rng, FileSystem dataFS, Path dataPath, FileSystem outFS,
        GUIPart guiPart) throws IOException {
    Path[] infiles = DFUtils.listOutputFiles(dataFS, dataPath);

    for (Path path : infiles) {
        //log.info("Classifying : {}", path);
        System.out.println("Classifying " + path);
        Path outfile = outPath != null ? new Path(outPath, path.getName()).suffix(".out") : null;
        rfTestFile(path, outfile, converter, forest, dataset, results, rng, outFS, dataFS, guiPart);
    }//from w  w  w .j  av  a  2s . c o  m
}

From source file:imageClassify.TestForest.java

License:Apache License

private void testDirectory(Path outPath, DataConverter converter, DecisionForest forest, Dataset dataset,
        Collection<double[]> results, Random rng) throws IOException {
    Path[] infiles = DFUtils.listOutputFiles(dataFS, dataPath);

    for (Path path : infiles) {
        log.info("Classifying : {}", path);
        Path outfile = outPath != null ? new Path(outPath, path.getName()).suffix(".out") : null;
        testFile(path, outfile, converter, forest, dataset, results, rng);
    }//from w ww. j a  va 2 s  .c o  m
}

From source file:javaapplication3.RunRandomForestSeq.java

private static void testDirectory(Path outPath, DataConverter converter, DecisionForest forest, Dataset dataset,
        Collection<double[]> results, Random rng, FileSystem dataFS, Path dataPath, FileSystem outFS)
        throws IOException {
    Path[] infiles = DFUtils.listOutputFiles(dataFS, dataPath);

    for (Path path : infiles) {
        //log.info("Classifying : {}", path);
        System.out.println("Classifying " + path);
        Path outfile = outPath != null ? new Path(outPath, path.getName()).suffix(".out") : null;
        testFile(path, outfile, converter, forest, dataset, results, rng, outFS, dataFS);
    }//from   w w w .  j a va  2s  . com
}