Package org.fnlp.ml.classifier.hier

Examples of org.fnlp.ml.classifier.hier.Predict


        e.printStackTrace();
        return null;
      }
    }

    Predict pred = new Predict(n);
    Predict oracle = null;
    if(target!=null){
      oracle = new Predict(n);
    }

    TIntIterator it = leafs.iterator();

    while(it.hasNext()){
     
      float score=0;
      int i = it.next();

      if(tree!=null){//计算含层次信息的内积
        int[] anc = tree.getPath(i);
        for(int j=0;j<anc.length;j++){
          score += sw[anc[j]];
        }
      }else{
        score = sw[i];
      }

      //给定目标范围是,只计算目标范围的值
      if(target!=null&&target.equals(i)){
        oracle.add(i,score);
      }else{
        pred.add(i,score);
      }

    }
View Full Code Here

TOP

Related Classes of org.fnlp.ml.classifier.hier.Predict

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.