We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e26083f commit ebfc3bdCopy full SHA for ebfc3bd
src/as.js
@@ -229,7 +229,7 @@ as.vector = function ( tokens, rdd ) {
229
v[ i ] = +( v[ i ] / numOfTokens ).toFixed( precision );
230
l2Norm += v[ i ] * v[ i ];
231
}
232
- // `l2Norm` becomes the 101th element for faster cosine similarity/normalization.
+ // `l2Norm` becomes the `size+1th` element for faster cosine similarity/normalization.
233
v.push( +( Math.sqrt( l2Norm ).toFixed( precision ) ) );
234
235
return v;
0 commit comments