Need:
-
$\operatorname{theoreticalMax}(C_{i,j})$ which is the theoretical maximum value of any element in$C_{i,j}$ . -
$M$ which is the number of entries we use to calculate variance in the matrix$C$ . Should be equal to$|\sim!\operatorname{eye}(C)|$ which I think is then equal to either$\frac{\operatorname{width}(C)\cdot(\operatorname{width}(C)+1)}{2}$ or$2\times$ that depending on whether we are just using the upper triangle or both the upper and lower triangle -
$v_\text{max}$ which is a calculation using the two above values. -
$R_\text{patch}$ which I think is the number of races that the patch adds. -
$S_\text{remaining}$ which is the sum of all the remaining spots we need to fill. -
$R_\text{min,patch}$ which is the theoretical mimumum number of races we add with our patch. Calculation using the above value. -
$v$ which is the variance of the matrix$C$ without the diagonal elements. -
$E$ which is the error. Lower for this value is better.$\lambda$ should control how much weight is given to either the length or variance.