How to treat null elements in element-wise vector multiplication

57 Views Asked by At

we need to multiply for statistical reasons two huge normalized (0-1) vectors via element-wise or coordinate-wise multiplication. These two vectors are of different dimension (they are word co-occurrence vectors). How should we treat the case where one element is present only in one vector? We want to keep that value in the result but leaving it unchanged is wrong.

Example: a={0.1,0.2,0.3} b={0.2,0.3,null} the result would be {0.02,0.06,??} we can't leave 0.3 because it's like giving a big score to that value with no reason. One cheating solution would be to do ^2, so 0.3^2 = 0.09 and that seems corrent but feels a bit cheating.