How do you calculate weighted average for: S, where S = a-b ?
I understand that if a and b have the same weights, i would compute S = a-b and then use the weights to compute weighted average of S.
But here I have the weight vectors for vector a and vector b. What weights do I use for S?
On the same note, what if S = ((a-b)/a) ?
First you need to define a weights vector that haves the same dimentions of
S
.For example:
Then define a weight vector with the same lenth of S and compute the weighted average:
This weights vector depends on the problem you are trying to solve. For example it can be the substraction of
a
andb
weights, their sum, etc.For
S = (a - b) / a
repeat the previous steps.