Package org.mitre.jcarafe.jarafe

Examples of org.mitre.jcarafe.jarafe.JarafeMETrainer


    this.masterTrainingInstanceListEvaluation = masterTrainingInstanceListEvaluation;
  }

  public void trainAndEval()
  {
    JarafeMETrainer trainer = new JarafeMETrainer(gaussianPrior);

    Collection<TrainingInstance> trainingInstanceSet =
        //getTrainingSplitList();
        getMasterTrainingInstanceListTraining();

    for (TrainingInstance currentTrainingInstance : trainingInstanceSet)
    {
      Set<String> featureSet = currentTrainingInstance.getFeatureSet();
      List<String> featureList = new ArrayList<String>(featureSet);
      trainer.addTrainingInstance(currentTrainingInstance.getExpectedValue(), featureList);
    }
    String model = trainer.train();
    //For testing: print out the model as a string -Alex Yeh

    writeModelToFile(model, trainingDirectory, "i2b2.model");

    // decoding
View Full Code Here

TOP

Related Classes of org.mitre.jcarafe.jarafe.JarafeMETrainer

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.