以下表达式为我返回无穷大。
Double sum =0.0;
sum = sum + Math.exp(getScore(contextFeatureVector,entry.getValue())+constant);
这里getScore
计算两个向量的内积。
Constant = 0.00001
向量值范围从 [-0.01,0.01], entry.getValue()
由多个线程读取/写入。entry.getValue()
是哈希图的值:
Map<Integer,ArrayList<Double>> anEntry = new ConcurrentHashmap();