Weighted sum: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 6: Line 6:
A weighted sum is a mathematical operation that takes multiple input values and assigns them weights, then adds them together. In machine learning contexts, this operation could be described as follows:
A weighted sum is a mathematical operation that takes multiple input values and assigns them weights, then adds them together. In machine learning contexts, this operation could be described as follows:


Given an input vector x = [x_1, x_2,..., x_n] and a weight vector w = [w_1, w_2,..., w_n], the weighted sum of x with respect to w is defined as:
Given an input vector x = [x<sub>1</sub>, x<sub>2</sub>,..., x<sub>n</sub>] and a weight vector w = [w<sub>1</sub>, w<sub>2</sub>,..., w<sub>n</sub>], the weighted sum of x with respect to w is defined as:


weighted sum = x_1 * w_1 + x_2 * 2_2 +... + x_n * w_n
weighted sum = (x<sub>1</sub> * w<sub>1</sub>) + (x<sub>2</sub> * w<sub>2</sub>) +... + (x<sub>n</sub> * w<sub>n</sub>)


==Example==
==Example==
Line 25: Line 25:
|}
|}


weighted sum = 4.75 = 3 * 2.1 + 1.5 * 0.7 + -2 * 1.3
weighted sum = 4.75 = (3 * 2.1) + (1.5 * 0.7) + (-2 * 1.3)


==How Weighted Sum is Used in Machine Learning==
==How Weighted Sum is Used in Machine Learning==