Examples of batchTrain()


Examples of sequence.Mira.batchTrain()

  private LinearTagger trainMira(ArrayList<SequenceInstance> data,
      Alphabet xA, Alphabet yA, int numIters, boolean doAveraging) {

    Mira mira = new Mira(doAveraging, numIters, xA, yA,
        new TwoYwithXFeatureFunction(xA, yA), new HammingLoss());
    return mira.batchTrain(data);
  }

  @SuppressWarnings("unused")
  private LinearTagger trainPerceptron(ArrayList<SequenceInstance> data,
      Alphabet xA, Alphabet yA, int numIters, boolean doAveraging) {
View Full Code Here

Examples of sequence.Perceptron.batchTrain()

  public static LinearTagger trainPerceptron(boolean doAveraging,
      int numIters, ArrayList<SequenceInstance> train, Alphabet xA,
      Alphabet yA) {
    Perceptron p = new Perceptron(doAveraging, numIters, xA, yA,
        new OneYwithXFeatureFunction(xA, yA));
    LinearTagger h = p.batchTrain(train);
    return h;
  }

  public static LinearTagger trainMira(boolean doAveraging, int numIters,
      ArrayList<SequenceInstance> train, Alphabet xA, Alphabet yA) {
View Full Code Here

Examples of sequence.Perceptron.batchTrain()

  private LinearTagger trainPerceptron(ArrayList<SequenceInstance> data,
      Alphabet xA, Alphabet yA, int numIters, boolean doAveraging) {

    Perceptron perceptron = new Perceptron(doAveraging, numIters, xA, yA,
        new OneYwithXFeatureFunction(xA, yA));
    return perceptron.batchTrain(data);
  }

  public void setDocument(Document document) {
    this.document = document;
  }
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.