Commit 8e4ce2a9 authored by Markus Klinik's avatar Markus Klinik

use weights

parent 4a64df53
......@@ -120,20 +120,20 @@ Calculating the product of a list of numbers can result in very high numbers, wh
We mitigate this problem by utilizing an equivalent formula of the weighted product, that directly calculates the ratio of the weighted product of two given assignments.
To understand the problem, let $x = \tuple{p_1, p_2, p_3, q_1}$ and $y = \tuple{P_1, P_2, P_3, Q_1}$ be the qualities of two assignments, where $p$ and $P$ are more-is-better criteria, and $q$ and $Q$ are less-is-better.
For this example, we take all weights to be 1.
Let $\tuple{w_1, w_2, w_3, w_4}$ be the weights.
We could calculate their scores individually and then take the ratio of the scores, as follows.
s_x = \frac{p_1 p_2 p_3}{q_1} & s_y = \frac{P_1 P_2 P_3}{Q_1} & r = \frac{s_x}{s_y}
s_x = \frac{p_1^{w_1} p_2^{w_2} p_3^{w_3}}{q_1^{w_4}} & s_y = \frac{P_1^{w_1} P_2^{w_2} P_3^{w_3}}{Q_1^{w_4}} & r = \frac{s_x}{s_y}
The result $r$ is the factor by how much better $x$ is than $y$.
If $r$ is greater than 1, then the score of $x$ is $r$ times better than the score of $y$.
If $r$ is less than 1, then $y$ is $r$ times better than $x$.
This calculation has the subexpressions $p_1 p_2 p_3$ and $P_1 P_2 P_3$, which can result in an intermediate result large enough to cause information loss.
This calculation has the subexpression $p_1^{w_1} p_2^{w_2} p_3^{w_3}$, and similar for the P's, which can result in an intermediate result large enough to cause information loss.
By using elementary laws of multiplication and division, we can alternatively calculate $r$ as follows.
r = \frac{p_1}{P_1} \times \frac{p_2}{P_2} \times \frac{p_3}{P_3} \times \frac{Q_1}{q_1}
r = (\frac{p_1}{P_1})^{w_1} \times (\frac{p_2}{P_2})^{w_2} \times (\frac{p_3}{P_3})^{w_3} \times (\frac{Q_1}{q_1})^{w_4}
We know that the $p_i$ and $P_i$ are objectives of the same capability requirement, so they are most likely in the same order of magnitude.
This results in smaller intermediate numbers, which decreases the chance for information loss.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment