Package org.fnlp.ml.types.alphabet

Examples of org.fnlp.ml.types.alphabet.StringFeatureAlphabet.keysize()


  public void removeZero(Linear cl) {
    StringFeatureAlphabet feature = (StringFeatureAlphabet) cl.getAlphabetFactory().DefaultFeatureAlphabet();
    float[] weights = cl.getWeights();   
    int c = MyArrays.countNoneZero(weights);
    System.out.println("\n优化前")
    System.out.println("字典索引个数"+feature.keysize());
    System.out.println("字典大小"+cl.getAlphabetFactory().DefaultFeatureAlphabet().size());
    System.out.println("权重长度"+weights.length);
    System.out.println("非零权重"+c)
    boolean freeze = false;
    if (feature.isStopIncrement()) {
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.