Package moa.classifiers

Examples of moa.classifiers.HoeffdingTree


          description = TupleUtilities.getString(readBlock(mDescriptionInput), INPUT_DESCRIPTION);
        else
          description = "";
         
       
        HoeffdingTree tree = new HoeffdingTree();
        String options;
        try
        {
        if(mOptionsInput != null)
          options = TupleUtilities.getMoaOptions(readBlock(mOptionsInput));
        else
          options = DEFAULT_OPTIONS;
         
        }
        catch (Exception e)
        {
            throw new ActivityUserException(e);
        }
        try
        {
          Tuple tuple;
       
          tree.getOptions().setViaCLIString(options);
          tree.prepareForUse();
          Calendar cal = Calendar.getInstance();
          this.startTime = cal.getTimeInMillis();
          if(mSummaryOutput != null) {
           
              mSummaryOutput.write(ControlBlock.LIST_BEGIN);
            }
          while((tuple = (Tuple)tuples.nextValue()) != null && tuple != ControlBlock.LIST_END) {
            Instance inst = WekaUtilities.createInstance(dataset, tuple);
            tree.trainOnInstance(inst);
            if(stepCounter == 0) {

                  writeOutput(new TupleClassifier(tree, WekaUtilities.getAttributes(dataset), classIndex));                                        
              }
           
View Full Code Here


          description = TupleUtilities.getString(readBlock(mDescriptionInput), INPUT_DESCRIPTION);
        else
          description = "";
         
       
        HoeffdingTree tree = new HoeffdingTree();
        String options;
        try
        {
        if(mOptionsInput != null)
          options = TupleUtilities.getMoaOptions(readBlock(mOptionsInput));
        else
          options = DEFAULT_OPTIONS;
         
        }
        catch (Exception e)
        {
            throw new ActivityUserException(e);
        }
        try
        {
          Tuple tuple;
       
          tree.getOptions().setViaCLIString(options);
          tree.prepareForUse();
          Calendar cal = Calendar.getInstance();
          this.startTime = cal.getTimeInMillis();

          while((tuple = (Tuple)tuples.nextValue()) != null && tuple != ControlBlock.LIST_END) {
            Instance inst = WekaUtilities.createInstance(dataset, tuple);
            tree.trainOnInstance(inst);
            if(stepCounter == 0) {

                  writeOutput(new TupleClassifier(tree, WekaUtilities.getAttributes(dataset), classIndex));                                        
              }
           
View Full Code Here

TOP

Related Classes of moa.classifiers.HoeffdingTree

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.