Package org.apache.mahout.df.data

Examples of org.apache.mahout.df.data.Dataset


    log.info("DistributedCache.getCacheFiles(): {}", ArrayUtils.toString(files));
   
    Preconditions.checkArgument(files != null && files.length >= 2, "missing paths from the DistributedCache");
   
    Path datasetPath = new Path(files[0].getPath());
    Dataset dataset = Dataset.load(conf, datasetPath);
   
    int numMaps = Builder.getNumMaps(conf);
    int p = conf.getInt("mapred.task.partition", -1);
   
    // total number of trees in the forest
View Full Code Here


      log.error("No Decision Forest found!");
      return;
    }

    // load the dataset
    Dataset dataset = Dataset.load(getConf(), datasetPath);
    DataConverter converter = new DataConverter(dataset);

    log.info("Sequential classification...");
    long time = System.currentTimeMillis();

    Random rng = RandomUtils.getRandom();
    ResultAnalyzer analyzer = analyze ? new ResultAnalyzer(Arrays.asList(dataset.labels()), "unknown") : null;

    if (dataFS.getFileStatus(dataPath).isDir()) {
      //the input is a directory of files
      testDirectory(outputPath, converter, forest, dataset, analyzer, rng);
    else {
View Full Code Here

      if (files == null || files.length < 2) {
        throw new IOException("not enough paths in the DistributedCache");
      }

      Dataset dataset = Dataset.load(conf, new Path(files[0].getPath()));

      converter = new DataConverter(dataset);

      forest = DecisionForest.load(conf, new Path(files[1].getPath()));
      if (forest == null) {
View Full Code Here

    String descriptor = DescriptorUtils.generateDescriptor(description);
   
    Path fPath = validateOutput(filePath);
   
    log.info("generating the dataset...");
    Dataset dataset = generateDataset(descriptor, dataPath);
   
    log.info("storing the dataset description");
    DFUtils.storeWritable(new Configuration(), fPath, dataset);
  }
View Full Code Here

   
    @Override
    protected void setup(Context context) throws IOException, InterruptedException {
      Configuration conf = context.getConfiguration();
     
      Dataset dataset = Builder.loadDataset(conf);
      setup(dataset);
    }
View Full Code Here

    private int nblabels;
   
    @Override
    protected void setup(Context context) throws IOException, InterruptedException {
      Configuration conf = context.getConfiguration();
      Dataset dataset = Builder.loadDataset(conf);
      setup(dataset.nblabels());
    }
View Full Code Here

TOP

Related Classes of org.apache.mahout.df.data.Dataset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.