Package joshua.discriminative.training.learning_algorithm

Examples of joshua.discriminative.training.learning_algorithm.DefaultCRF


      if(f_feature_set!=null){
        DiscriminativeSupport.loadModel(f_feature_set, crfModel, null);
      }else{
        System.out.println("In crf, must specify feature set"); System.exit(0);
      }
      optimizer = new DefaultCRF(crfModel, train_size, batch_update_size, converge_pass, init_gain, sigma, is_minimize_score);
      optimizer.initModel(-1, 1);//TODO optimal initial parameters
      hgdl = new HGDiscriminativeLearner(optimizer, new HashSet<String>(crfModel.keySet()));
      hgdl.reset_baseline_feat();//add and init baseline feature
      System.out.println("size3: " + optimizer.getSumModel().size());
    }else{//perceptron
View Full Code Here


        DiscriminativeSupport.loadModel(initModelFile, crfModel, null);
      else{
        System.out.println("In crf, must specify feature set");
        System.exit(0);
      }
      optimizer = new DefaultCRF(crfModel, trainSize, batchUpdateSize, convergePass, initGain, sigma, isMinimizeScore);
      optimizer.initModel(0, 0);//TODO optimal initial parameters
      ndl = new NBESTDiscriminativeLearner(optimizer, new HashSet<String>(crfModel.keySet()));
      ndl.resetBaselineFeat();//add and init baseline feature
    }else{//perceptron
      HashMap<String,Double> perceptronSumModel = new HashMap<String,Double>();
View Full Code Here

TOP

Related Classes of joshua.discriminative.training.learning_algorithm.DefaultCRF

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.