[Math] Generate linear, exponential weights and the sum of both (sum of all = 1)

exponential functionlinear algebra

Hi I am trying to calculate linear, exponentian weights and a combination of both.

Linear weights are defined as:

$\sum_{i}^N w_i = w_1+w_2+…+w_N = 1$

Example:

A = 100, B = 50, C = 400

weight_A = 100/550 = 18%
weight_B = 50/550 = 9%
weight_C = 400/550 = 73%

Exponential Weights:

The weights should follow an exponential function $e^x$ and the weight should also sum up to 1:

$\sum_{i}^N w_i = \frac{w^{N-i}}{\sum_{i}^Nw^{N-i}} = 1$, $\forall$ $N = 1,…,n$

Example:

A = 100, B = 50, C = 400, Smoothening = 0.6, N = 3

weight_A = 100*0.6^(3-1)/494 = 11%
weight_B = 50*0.6^(2-1)/494 = 8%
weight_C = 400*0.6^(1-1)/494 = 81%

How would a combination of linear and exponential using the indicator function look like to get a sum of weight of 1. Is that possible and if yes is an example possible?

Linear + Exponential:

Using the linear weights from:

weight_A = 18%
weight_B = 9%

and the exponential weight from:

weight_C = 81%

because all values above 350 will be exponential weighted in this case C is 400 and therefore > 350. When summing it up, I would receive weights larger than 100%.

I would expect doing the following:

$sum_{weights} = w_{A_{linear}}+w_{B_{linear}}+w_{C_{exponential}} = 125\%$

Then I normalize it by the sum of all weights:

$\frac{w_{A_{linear}}}{sum_{weights}} + \frac{w_{B_{linear}}}{sum_{weights}} + \frac{w_{C_{exponential}}}{sum_{weights}} = 100\%$

The main question is, whether this is the proper approach for all three ways determine weights?

Best Answer

You have the linear weight $w^{(l)} = (w^{(l)}_k)$ with $\sum_k w^{(l)}_k = 1$ and the exponential weight $w^{(e)} = (w^{(e)}_k)$ with $\sum_k w^{(e)}_k = 1$.

How about $$ w_k = W_1 w^{(l)}_k + W_2 w^{(e)}_k $$ for any $W_1$, $W_2$ with $W_1 + W_2 = 1$, which is a weight. :) Then $$ \sum_k w_k = \sum_k \left( W_1 w^{(l)}_k + W_2 w^{(e)}_k \right) = W_1 \left( \sum_k w^{(l)}_k \right) + W_2 \left( \sum_k w^{(e)}_k \right) = W_1 + W_2 = 1 $$

Example:

If $$ W_1 = 1/3, W_2 = 2/3 $$ then $$ w_k = \frac{1}{2} w^{(l)}_k + \frac{2}{3} w^{(e)}_k $$ should do the job.

Related Question