Package weka.core

Examples of weka.core.SparseInstance.classValue()


      classifier.resetLearningImpl();
    }else if(obj.getClass() == SparseInstance.class){
      //If it's an instance
      SparseInstance inst = (SparseInstance) obj;
      //Emit the entire prediction array and the correct value
      collector.emit(new Values(classifier.getVotesForInstance(inst), inst.classValue()));
      //Train on instance
      classifier.trainOnInstanceImpl(inst);
      //Send out our latest classifier
      ClassifierInstance latestClassifier = classifier.getLatestClassifier();
      if(latestClassifier != null)
View Full Code Here


      classifier.setModelContext(INST_HEADERS);
      classifier.resetLearningImpl();
    }else{
      SparseInstance inst = (SparseInstance) obj;
      //Emit the entire prediction array and the correct value
      collector.emit(new Values(classifier.getVotesForInstance(inst), inst.classValue()));
      //Train on instance
      classifier.trainOnInstanceImpl(inst);
    }
   
    collector.ack(input);
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.