sim_{cos}(d_{j}, q) = \frac{(d_{j}|q)}{∥d_{j}∥∥q∥} = \frac{∑_{i=1}^{n} w_{ij}q_{i}}{\sqrt{(∑_{i=1}^{n} w_{ij}^{2})(∑_{i=1}^{n} q_{i}^{2})}}