\(\sqrt{rs/(r+s)}\,\log(g(x_{num})/g(x_{den}))\): the normalised log-ratio of the geometric means of two disjoint groups of parts.
Details
A composition carries only RELATIVE information – doubling every part changes nothing – so any statistic computed on the raw proportions is measuring the constraint rather than the data. Log ratios are the coordinates that respect that, and the \(\sqrt{rs/(r+s)}\) factor makes balances from different group sizes comparable.
Zeros are fatal, not inconvenient: the logarithm is undefined, and the function refuses rather than adding an arbitrary constant that would silently determine the answer. Replace them deliberately first.
