Examples of DecisionTree


Examples of aima.core.learning.inductive.DecisionTree

    if (attributeNames.size() == 0) {
      return majorityValue(ds);
    }
    String chosenAttribute = chooseAttribute(ds, attributeNames);

    DecisionTree tree = new DecisionTree(chosenAttribute);
    ConstantDecisonTree m = majorityValue(ds);

    List<String> values = ds.getPossibleAttributeValues(chosenAttribute);
    for (String v : values) {
      DataSet filtered = ds.matchingDataSet(chosenAttribute, v);
      List<String> newAttribs = Util.removeFrom(attributeNames,
          chosenAttribute);
      DecisionTree subTree = decisionTreeLearning(filtered, newAttribs, m);
      tree.addNode(v, subTree);

    }

    return tree;
View Full Code Here

Examples of aima.core.learning.inductive.DecisionTree

    if (attributeNames.size() == 0) {
      return majorityValue(ds);
    }
    String chosenAttribute = chooseAttribute(ds, attributeNames);

    DecisionTree tree = new DecisionTree(chosenAttribute);
    ConstantDecisonTree m = majorityValue(ds);

    List<String> values = ds.getPossibleAttributeValues(chosenAttribute);
    for (String v : values) {
      DataSet filtered = ds.matchingDataSet(chosenAttribute, v);
      List<String> newAttribs = Util.removeFrom(attributeNames,
          chosenAttribute);
      DecisionTree subTree = decisionTreeLearning(filtered, newAttribs, m);
      tree.addNode(v, subTree);

    }

    return tree;
View Full Code Here

Examples of aima.core.learning.inductive.DecisionTree

      List<Learner> learners = new ArrayList<Learner>();

      System.out
          .println("\nStump Learners vote to decide in this algorithm");
      for (Object stump : stumps) {
        DecisionTree sl = (DecisionTree) stump;
        StumpLearner stumpLearner = new StumpLearner(sl, "No");
        learners.add(stumpLearner);
      }
      AdaBoostLearner learner = new AdaBoostLearner(learners, ds);
      learner.train(ds);
View Full Code Here

Examples of aima.core.learning.inductive.DecisionTree

      throws Exception {
    DataSet ds = DataSetFactory.getRestaurantDataSet();
    List<DecisionTree> stumps = DecisionTree.getStumpsFor(ds, YES, "No");
    List<Learner> learners = new ArrayList<Learner>();
    for (Object stump : stumps) {
      DecisionTree sl = (DecisionTree) stump;
      StumpLearner stumpLearner = new StumpLearner(sl, "No");
      learners.add(stumpLearner);
    }
    AdaBoostLearner learner = new AdaBoostLearner(learners, ds);
    learner.train(ds);
View Full Code Here

Examples of cascading.pattern.model.tree.decision.DecisionTree

    }

  @Override
  public void operate( FlowProcess flowProcess, FunctionCall<Context<DecisionTree>> functionCall )
    {
    DecisionTree decisionTree = functionCall.getContext().payload;

    FinalDecision finalDecision = decisionTree.decide( functionCall.getArguments() );

    LOG.debug( "decision: {}", finalDecision );

    Object result = this.result.transform( finalDecision );
View Full Code Here

Examples of cascading.pattern.model.tree.decision.DecisionTree

    return createDecisionTree( null, argumentFields );
    }

  public DecisionTree createDecisionTree( String[] categories, Fields argumentFields )
    {
    return new DecisionTree( categories, argumentFields, this, this.getRoot() );
    }
View Full Code Here

Examples of de.fhkn.in.uce.connectivitymanager.selector.decisiontree.DecisionTree

    @Before
    public void setUp() {
        this.actualResult = new ArrayList<NATTraversalTechnique>();
        this.expectedResult = new ArrayList<NATTraversalTechnique>();
        DecisionTree decisionTree = new MapDT();
        decisionTree.buildDecisionTree(NATTraversalRegistryImpl.getInstance().getRulesForDecisionTreeLearning());
        this.selector = new ConnectionSetupTimeSelection(NATTraversalRegistryImpl.getInstance(), decisionTree);
    }
View Full Code Here

Examples of de.fhkn.in.uce.connectivitymanager.selector.decisiontree.DecisionTree

        this.registry = registry;
        this.decisionTree = initializedDecisionTree;
    }

    private DecisionTree getInitializedDecisionTree() {
        DecisionTree result = new MapDT();
        this.initializeDecisionTree(result);
        return result;
    }
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptc.experimental.classifiers.DecisionTree

   
    ClassificationEvaluator ce = new ClassificationEvaluator();
 
    if(true) {
      DecisionTree dt = new DecisionTree(bagEvents);
      dt.printTree();
      for(int i=0;i<testBagEvents.size();i++) {
        BagEvent be = testBagEvents.get(i);
        String result = dt.testBag(be.getFeatures());
        ce.logEvent(be.getClassLabel(), result);
      }
      System.out.println(ce.getAccuracy());
      System.out.println(ce.getKappa());     
      ce.pprintConfusionMatrix();
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptc.experimental.classifiers.DecisionTree

   
    ClassificationEvaluator ce = new ClassificationEvaluator();
 
    if(false) {
      ce = new ClassificationEvaluator();
      DecisionTree dt = new DecisionTree(bagEvents);
      dt.printTree();
      for(int i=0;i<testBagEvents.size();i++) {
        BagEvent be = testBagEvents.get(i);
        String result = dt.testBag(be.getFeatures());
        ce.logEvent(be.getClassLabel(), result);
      }
      System.out.println(ce.getAccuracy());
      System.out.println(ce.getKappa());     
      ce.pprintConfusionMatrix();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.