public double dotProduct (int sequencePosition, Matrix2 weights, int weightRowIndex) { return weights.rowDotProduct (weightRowIndex, sequence[sequencePosition]); }
public void getUnNormalizedScores (Matrix2 lambdas, FeatureVector fv, double[] scores) { for (int li = 0; li < 2; li++) { scores[li] = lambdas.value (li, numSGDFeatures) + lambdas.rowDotProduct (li, fv, numSGDFeatures,null); } }
public void getUnNormalizedScores (Matrix2 lambdas, FeatureVector fv, double[] scores) { int defaultFeatureIndex = pipe.getDataAlphabet().size(); assert (fv.getAlphabet () == pipe.getDataAlphabet ()); for (int li = 0; li < 2; li++) { scores[li] = lambdas.value (li, defaultFeatureIndex) + lambdas.rowDotProduct (li, fv, defaultFeatureIndex,null); } }
edgeVal = (double)parameters.rowDotProduct(0,(FeatureVector)pair.getData()) - (double)parameters.rowDotProduct(1,(FeatureVector)pair.getData());
+ lambdas.rowDotProduct (yesIndex, fv, defaultFeatureIndex,null); scores[noIndex] = lambdas.value (noIndex, defaultFeatureIndex) + lambdas.rowDotProduct (noIndex, fv, defaultFeatureIndex,null);