Package cc.mallet.classify.constraints.pr

Examples of cc.mallet.classify.constraints.pr.MaxEntL2FLPRConstraints


    if (constraints == null && constraintsFile != null) {
      HashMap<Integer,double[]> constraintsMap =
        FeatureConstraintUtil.readConstraintsFromFile(constraintsFile, data);
      logger.info("number of constraints: " + constraintsMap.size());
      constraints = new ArrayList<MaxEntPRConstraint>();
      MaxEntL2FLPRConstraints prConstraints = new MaxEntL2FLPRConstraints(data.getDataAlphabet().size(),
          data.getTargetAlphabet().size(),useValues,normalize);
      for (int fi : constraintsMap.keySet()) {
        prConstraints.addConstraint(fi, constraintsMap.get(fi), qGPV);
      }
      constraints.add(prConstraints);
    }

    BitSet instancesWithConstraints = new BitSet(data.size());
View Full Code Here

TOP

Related Classes of cc.mallet.classify.constraints.pr.MaxEntL2FLPRConstraints

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.