I'm looking for a function that measures if a vector component dominates all the rest. Let

$$ \mathbf{v} = [v_1, v_2, \ldots, v_n] $$

and assume that it is L2 normalized, $|\mathbf{v}|_2 = \sqrt{\sum_{i=1}^n v_i^2} = 1$. If it helps, consider $\mathbf{v}$ a normalized unit vector from a matrix diagonalization.

The function $\theta$ should be maximized when:

$$v_i=1,v_{j \neq i}=0 \rightarrow \theta=1$$

and it should be small (on average) when the components are drawn from a standard normal distribution:

$$v_i = \mathcal{N}(0,\sigma^2=1)$$

but should somehow vary in a "reasonable" way in-between.

  • 1
    $\begingroup$ It seems you are considering the inequality between the components in $v$. You may want to use Gini coefficient (en.wikipedia.org/wiki/Gini_coefficient). (Imagine $v$ as a vector of people's income in a nation.) Another measure could be $D(v)\equiv n\times\{median(v) - mean(v)\}$ when $n>2$? If $v$ was drawn from a symmetric distribution, $D(v)=0$. In your case $v = (0,0,\dots,1)$, $D(v)=1$. $\endgroup$ – semibruin May 21 '15 at 16:32
  • $\begingroup$ The Gini coefficient is perfect, thanks for introducing it to me! To make it work for my example, I simply used $v_i^2$ and scaled gini coefficient $g \rightarrow 2(g-(1/2))$. This gives 0 for a uniform distribution and one for my test case. Please post this as an answer so I can accept it. $\endgroup$ – Hooked May 21 '15 at 16:51

For a vector $v$, set

$$ Z(v) = \frac{\max |v_i|}{\sqrt{\sum_i v_i^2}} $$

Then for vectors of length $n$.

$$ Z(0, 0, \ldots, 1, \ldots, 0) = 1$$


$$ Z(a, a, \ldots, a) = \frac{1}{\sqrt{n}} $$

These are the maximum and minimum values, because on one hand

$$ \max |v_i| = \max \sqrt{v_i^2} \leq \sqrt{\sum_i v_i^2} $$

and on the other

$$ \sqrt{\sum_i v_i^2} \leq \sqrt{\sum_i \max_j{v_j^2}} = \sqrt{n \max_j{v_j^2}} = \sqrt{n} \max{|v_i|} $$

So that's a function with your desired property that maps $R^n$ into the interval $\left[ \frac{1}{\sqrt{n}}, 1 \right]$. You can then choose any monotonic function $M: \left[ \frac{1}{\sqrt{n}}, 1 \right] \rightarrow [0, 1]$ to post compose with.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.