Package org.apache.mahout.df

Examples of org.apache.mahout.df.DecisionForest


      Step2Job step2 = new Step2Job(getOutputPath(conf), getDataPath(), getDatasetPath(), partitions);
     
      step2.run(new Configuration(conf), keys, trees, callback);
    }
   
    return new DecisionForest(Arrays.asList(trees));
  }
View Full Code Here


          callback.prediction(entry.getKey(), index, predictions[index]);
        }
      }
    }
   
    return new DecisionForest(trees);
  }
View Full Code Here

      return null;
    }
   
    if (isOutput(conf)) {
      log.debug("Parsing the output...");
      DecisionForest forest = parseOutput(job, callback);
     
      // delete the output path
      fs.delete(outputPath, true);
     
      return forest;
View Full Code Here

    for (int treeId = 0; treeId < nbTrees; treeId++) {
      trees.add(bagging.build(treeId, rng, callback));
      logProgress(((float) treeId + 1) / nbTrees);
    }
   
    return new DecisionForest(trees);
  }
View Full Code Here

          callback.prediction(entry.getKey(), index, predictions[index]);
        }
      }
    }
   
    return new DecisionForest(trees);
  }
View Full Code Here

    log.debug("Running the job...");
    runJob(job);
   
    if (isOutput(job)) {
      log.debug("Parsing the output...");
      DecisionForest forest = parseOutput(job, callback);
     
      // delete the output path
      fs.delete(outputPath, true);
     
      return forest;
View Full Code Here

      Step2Job step2 = new Step2Job(getOutputPath(job), getDataPath(), getDatasetPath(), partitions);
     
      step2.run(job, keys, trees, callback);
    }
   
    return new DecisionForest(Arrays.asList(trees));
  }
View Full Code Here

  }

  @Override
  protected DecisionForest parseOutput(JobConf job, PredictionCallback callback)
      throws IOException {
    DecisionForest forest = processOutput(firstOutput.getKeys(), firstOutput.getValues(), callback);

    if (isStep2(job)) {
      Path forestPath = new Path(getOutputPath(job), "step1.inter");
      FileSystem fs = forestPath.getFileSystem(job);
     
      Node[] trees = new Node[forest.getTrees().size()];
      forest.getTrees().toArray(trees);
      InterResults.store(fs, forestPath, firstOutput.getKeys(), trees, sizes);

      log.info("***********");
      log.info("Second Step");
      log.info("***********");
 
View Full Code Here

        callback.prediction(key.treeId(), firstIds[key.partition()] + id,
            predictions[id]);
      }
    }
   
    return new DecisionForest(trees);
  }
View Full Code Here

    }
   
    log.info("Building the forest...");
    long time = System.currentTimeMillis();
   
    DecisionForest forest = forestBuilder.build(nbTrees, callback);
   
    time = System.currentTimeMillis() - time;
    log.info("Build Time: {}", DFUtils.elapsedTime(time));
   
    if (isOob) {
View Full Code Here

TOP

Related Classes of org.apache.mahout.df.DecisionForest

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.