Package moa.classifiers

Examples of moa.classifiers.Classifier


    @Override
    public void resetLearningImpl() {
      try {
      lock.acquire();   
          this.ensemble = new ArrayDeque<ClassifierInstance>(ensembleSizeOption.getValue());
          Classifier baseLearner = (Classifier) getPreparedClassOption(this.baseLearnerOption);
          baseLearner.resetLearning();
      } catch (InterruptedException e) {
      e.printStackTrace();
    } finally {
      lock.release();
    }
View Full Code Here


    @Override
    public void trainOnInstanceImpl(Instance inst) {
      try {
      lock.acquire();
      //Get a new classifier
        Classifier newClassifier = ((Classifier) getPreparedClassOption(this.baseLearnerOption)).copy();
        ensemble.add(new ClassifierInstance(newClassifier));
       
        //If we have too many classifiers
        while(ensemble.size() > ensembleSizeOption.getValue())
          ensemble.pollFirst();
View Full Code Here

TOP

Related Classes of moa.classifiers.Classifier

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.