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);
}
}