Package org.apache.mahout.classifier.df.mapreduce

Examples of org.apache.mahout.classifier.df.mapreduce.MapredOutput


   */
  protected static DecisionForest processOutput(TreeID[] keys, MapredOutput[] values) {
    List<Node> trees = Lists.newArrayList();

    for (int index = 0; index < keys.length; index++) {
      MapredOutput value = values[index];
      trees.add(value.getTree());
    }
   
    return new DecisionForest(trees);
  }
View Full Code Here


      Node tree = bagging.build(rng);
     
      key.set(partition, firstTreeId + treeId);
     
      if (isOutput()) {
        MapredOutput emOut = new MapredOutput(tree);
        context.write(key, emOut);
      }
    }
  }
View Full Code Here

    log.debug("Building...");
    Node tree = bagging.build(rng);
   
    if (isOutput()) {
      log.debug("Outputing...");
      MapredOutput mrOut = new MapredOutput(tree);
     
      context.write(key, mrOut);
    }
  }
View Full Code Here

   */
  private static DecisionForest processOutput(Map<Integer,MapredOutput> output) {
    List<Node> trees = Lists.newArrayList();
   
    for (Map.Entry<Integer,MapredOutput> entry : output.entrySet()) {
      MapredOutput value = entry.getValue();
      trees.add(value.getTree());
    }
   
    return new DecisionForest(trees);
  }
View Full Code Here

    // read all the outputs
    int index = 0;
    for (Path path : outfiles) {
      for (Pair<TreeID,MapredOutput> record : new SequenceFileIterable<TreeID, MapredOutput>(path, conf)) {
        TreeID key = record.getFirst();
        MapredOutput value = record.getSecond();
        if (keys != null) {
          keys[index] = key;
        }
        if (trees != null) {
          trees[index] = value.getTree();
        }
        index++;
      }
    }
View Full Code Here

      for (int treeId = 0; treeId < nbTrees; treeId++) {
        Node tree = new Leaf(rng.nextInt(100));

        keys[index] = new TreeID(partition, treeId);
        values[index] = new MapredOutput(tree, nextIntArray(rng, NUM_INSTANCES));

        index++;
      }
     
      firstIds[p] = firstId;
View Full Code Here

      for (int treeId = 0; treeId < nbTrees; treeId++) {
        Node tree = new Leaf(rng.nextInt(100));

        keys[index] = new TreeID(partition, treeId);
        values[index] = new MapredOutput(tree, nextIntArray(rng, NUM_INSTANCES));

        index++;
      }
     
      firstIds[p] = firstId;
View Full Code Here

      Node tree = bagging.build(rng);
     
      key.set(partition, firstTreeId + treeId);
     
      if (isOutput()) {
        MapredOutput emOut = new MapredOutput(tree);
        context.write(key, emOut);
      }
    }
  }
View Full Code Here

      Node tree = bagging.build(rng);
     
      key.set(partition, firstTreeId + treeId);
     
      if (!isNoOutput()) {
        MapredOutput emOut = new MapredOutput(tree);
        context.write(key, emOut);
      }
    }
  }
View Full Code Here

    log.debug("Building...");
    Node tree = bagging.build(rng);
   
    if (!isNoOutput()) {
      log.debug("Outputing...");
      MapredOutput mrOut = new MapredOutput(tree);
     
      context.write(key, mrOut);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.classifier.df.mapreduce.MapredOutput

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.