Presentation is loading. Please wait.

Presentation is loading. Please wait.

Signal , Weight Vector Spaces and Linear Transformations

Similar presentations


Presentation on theme: "Signal , Weight Vector Spaces and Linear Transformations"— Presentation transcript:

1 Signal , Weight Vector Spaces and Linear Transformations

2 Notation Vectors in Ân. Generalized Vectors. 𝐱 𝐱=𝑎nxn+â€Ļ+𝑎1x+𝑎0
2 n = 𝐱 𝐱=𝑎nxn+â€Ļ+𝑎1x+𝑎0 𝐱= 𝑎1,1 𝑎1,2 𝑎2,1 𝑎2,2

3 Vector Space 1. An operation called vector addition is defined such that if x Î X and y Î X then x + y Î X. 2. x + y = y + x 3. (x + y) + z = x + (y + z) 4. There is a unique vector 0 Î X, called the zero vector, such that x + 0 = x for all x Î X. 5. For each vector there is a unique vector in X, to be called (-x ), such that x + (-x ) = 0 .

4 Vector Space (Cont.) 6. An operation, called multiplication, is defined such that for all scalars a Î F, and all vectors x  Î X, a x  Î X. 7. For any x  Î X , 1x = x (for scalar 1). 8. For any two scalars a Î F and b Î F, and any x Î X, a (bx) = (a b) x . 9. (a + b) x = a x + b x . 10. a (x + y)  = a x + a y

5 Examples (Decision Boundaries)
Is the p2, p3 plane a vector space?

6 Examples (Decision Boundaries)
Is the line p1 + 2p2 - 2 = 0 a vector space?

7 Other Vector Spaces Polynomials of degree 2 or less. đļ[0,1]:
Continuous functions in the interval [0,1]. 𝜒=sin⁡(𝑡) 𝒴=𝑒−2𝑡

8 is a set of linearly independent vectors.
Linear Independence If implies that each then is a set of linearly independent vectors.

9 Therefore the vectors are independent.
Example Let This can only be true if Therefore the vectors are independent.

10 Problem P5.3(Gramian) i. 𝐱1= 1 1 1 𝐱2= 1 0 1 𝐱3= 1 2 1
= − =−2+0+2=0 G= (𝐱1,𝐱1) (𝐱1,𝐱2) (𝐱1,𝐱3) (𝐱2,𝐱1) (𝐱2,𝐱2) (𝐱2,𝐱3) (𝐱3,𝐱1) (𝐱3,𝐱2) (𝐱3,𝐱3) = = − =24−8−16=0

11 Problem P5.3(Gramian)(cont.)
đĸđĸđĸ. 𝐱1= 𝐱2= 𝐱3= G= (𝐱1,𝐱1) (𝐱1,𝐱2) (𝐱1,𝐱3) (𝐱2,𝐱1) (𝐱2,𝐱2) (𝐱2,𝐱3) (𝐱3,𝐱1) (𝐱3,𝐱2) (𝐱3,𝐱3) = = − =48−18−30=0 2 𝐱1- 𝐱2 −𝐱3=0 G= =4≠0

12 Gramian 𝐏=[𝐱1,𝐱2,⋯,𝐱𝑛] G 𝐱1,𝐱2,⋯,𝐱𝑛 = 𝐏TÃ—đ = (𝐱1,𝐱1) (𝐱1,𝐱2) (𝐱2,𝐱1) (𝐱2,𝐱2) ⋯ (𝐱1,𝐱𝑛) (𝐱2,𝐱𝑛) ⋮ ⋱ ⋮ (𝐱𝑛,𝐱1) (𝐱𝑛,𝐱2) ⋯ (𝐱𝑛,𝐱𝑛) G 𝐱1,𝐱2,⋯,𝐱𝑛 ≠0 iff 𝐱1,𝐱2,⋯,𝐱𝑛 are linearly independent G 𝐱1,𝐱2,⋯,𝐱𝑛 =0 iff 𝐱1,𝐱2,⋯,𝐱𝑛 are linearly dependent

13 Spanning a Space A subset spans a space if every vector in the space can be written as a linear combination of the vectors in the subspace.

14 Basis Vectors A set of basis vectors for the space X is a set of vectors which spans X and is linearly independent. The dimension of a vector space, Dim(X), is equal to the number of vectors in the basis set. Let X be a finite dimensional vector space, then every basis set of X has the same number of elements.

15 Example Polynomials of degree 2 or less. Basis A: Basis B:
(Any three linearly independent vectors in the space will work.) How can you represent the vector x = 1+2t using both basis sets? 𝜒= 𝐮1+𝐮2 2 +𝐮2−𝐮1= 3𝐮2−𝐮1 2 𝐮1+𝐮2=2,𝐮2−𝐮1=2t

16 Inner Product / Norm A scalar function of vectors x and y can be defined as an inner product, (x , y ), provided the following are satisfied (for real inner products): (x , y ) = (y , x ) . (x , ay1+by2) = a( x , y1) + b( x , y2) . (x , x) ≧ 0 , where equality holds iff x = 0 . A scalar function of a vector x is called a norm, ||x || provided the following are satisfied: ||x || ≧0 . ||x || = 0 iff x = 0 . ||a x || = |a| ||x || for scalar a . ||x + y || ≤ ||x || + ||y || .

17 Example Angle: Standard Euclidean Inner Product
Standard Euclidean Norm ||x || = (x , x)1/2 ||x|| = (xTx)1/2 = x12 + x xn2 đļ[0,1] Inner Product(see Problem P5.6): đ‘Ĩ, đ‘Ļ = 0 1 đ‘Ĩ 𝑡 đ‘Ļ 𝑡 𝑑𝑡 cosq = (x , y) ||x || ||y || Angle:

18 Problem P5.6 An inner product must satisfy the following properties.
1. đ‘Ĩ,đ‘Ļ =(đ‘Ļ,đ‘Ĩ) đ‘Ĩ,đ‘Ļ = 0 1 đ‘Ĩ 𝑡 đ‘Ļ 𝑡 𝑑𝑡 = 0 1 đ‘Ļ 𝑡 đ‘Ĩ 𝑡 𝑑𝑡 =(đ‘Ļ,đ‘Ĩ) 2. đ‘Ĩ,𝑎đ‘Ļ1+𝑏đ‘Ļ2 =𝑎 đ‘Ĩ,đ‘Ļ1 +𝑏(đ‘Ĩ,đ‘Ļ2) đ‘Ĩ,𝑎đ‘Ļ1+𝑏đ‘Ļ2 = 0 1 đ‘Ĩ 𝑡 𝑎đ‘Ļ1 𝑡 +𝑏đ‘Ļ2 𝑡 𝑑𝑡 = 0 1 đ‘Ĩ 𝑡 𝑎đ‘Ļ1 𝑡 𝑑𝑡 đ‘Ĩ 𝑡 𝑏đ‘Ļ2 𝑡 𝑑𝑡= 𝑎 đ‘Ĩ,đ‘Ļ1 +𝑏(đ‘Ĩ,đ‘Ļ2)

19 Problem P5.6(cont.) 3. đ‘Ĩ,đ‘Ĩ â‰Ĩ0,where equality holds iff x is the zero vector đ‘Ĩ,đ‘Ĩ = 0 1 đ‘Ĩ 𝑡 đ‘Ĩ 𝑡 𝑑𝑡 0 1 đ‘Ĩ 𝑡 2𝑑𝑡 â‰Ĩ0 Equality holds here only if đ‘Ĩ 𝑡 =0 for 0≤𝑡≤1 ,which is the zero vector

20 Two vectors x , y ÎX are orthogonal if (x , y) = 0 .
Orthogonality Two vectors x , y ÎX are orthogonal if (x , y) = 0 . Example Any vector in the p2,p3 plane is orthogonal to the weight vector.

21 Gram-Schmidt Orthogonalization
Independent Vectors Orthogonal Vectors đ‘Ļ1,đ‘Ļ2,â€Ļ,đ‘Ļ𝑛 đ‘Ŗ1,đ‘Ŗ2,â€Ļ,đ‘Ŗ𝑛 Step 1: Set first orthogonal vector to first independent vector. đ‘Ŗ1=đ‘Ļ1 Step 2: Subtract the portion of y2 that is in the direction of v1. đ‘Ŗ2=đ‘Ļ2−𝑎đ‘Ŗ1 Where a is chosen so that v2 is orthogonal to v1: đ‘Ŗ1,đ‘Ŗ2 = đ‘Ŗ1,đ‘Ļ2−𝑎đ‘Ŗ1 = đ‘Ŗ1,đ‘Ļ2 −𝑎 đ‘Ŗ1,đ‘Ŗ1 =0 𝑎= (đ‘Ŗ1,đ‘Ļ2) (đ‘Ŗ1,đ‘Ŗ1)

22 Gram-Schmidt (Cont.) Projection of y2 on v1: (đ‘Ŗ1,đ‘Ļ2) (đ‘Ŗ1,đ‘Ŗ1) đ‘Ŗ1
Step k: Subtract the portion of yk that is in the direction of all previous vi . đ‘Ŗ𝑘=đ‘Ļ𝑘− 𝑖=1 𝑘−1 (đ‘Ŗ𝑖,đ‘Ļ𝑘) (đ‘Ŗ𝑖,đ‘Ŗ𝑖) đ‘Ŗ𝑖

23 Example 𝐲1= ,𝐲2=

24 Example Step 1īŧš đ¯1=𝐲1= 2 1

25 Example (Cont.) Step 2.

26 Vector Expansion If a vector space X has a basis set {v1, v2, ..., vn}, then any x ÎX has a unique vector expansion: 𝜒= 𝑖=1 𝑛 đ‘Ĩ𝑖đ‘Ŗ𝑖 =đ‘Ĩ1đ‘Ŗ1+đ‘Ĩ2đ‘Ŗ2+â€Ļ+đ‘Ĩ𝑛đ‘Ŗ𝑛 If the basis vectors are orthogonal, and we take the inner product of vj and x : đ‘Ŗj,𝜒 = đ‘Ŗj, 𝑖=1 𝑛 đ‘Ĩiđ‘Ŗi = 𝑖=1 𝑛 đ‘Ĩi(đ‘Ŗj,đ‘Ŗi) =đ‘Ĩj(đ‘Ŗj,đ‘Ŗj) Therefore the coefficients of the expansion can be computed: đ‘Ĩj= (đ‘Ŗj,𝜒) (đ‘Ŗj,đ‘Ŗj)

27 Column of Numbers The vector expansion provides a meaning for
writing a vector as a column of numbers. 𝜒= 𝑖=1 𝑛 đ‘Ĩ𝑖đ‘Ŗ𝑖 =đ‘Ĩ1đ‘Ŗ1+đ‘Ĩ2đ‘Ŗ2+â€Ļ+đ‘Ĩ𝑛đ‘Ŗ𝑛 đ‘Ĩ= đ‘Ĩ1 đ‘Ĩ2 ⋮ đ‘Ĩ𝑛 To interpret x, we need to know what basis was used for the expansion.

28 Reciprocal Basis Vectors
Definition of reciprocal basis vectors, ri: 𝑟𝑖,đ‘Ŗ𝑗 = 𝑖≠𝑗 = 𝑖=𝑗 where the basis vectors are {v1, v2, ..., vn}, and the reciprocal basis vectors are {r1, r2, ..., rn}. For vectors in Ân we can use the following inner product: 𝑟𝑖,đ‘Ŗ 𝑗 =𝑟 𝑖 𝑇đ‘Ŗ𝑗 倒數åŸēåē• Therefore, the equations for the reciprocal basis vectors become:

29 Vector Expansion 𝜒=đ‘Ĩ1đ‘Ŗ1+đ‘Ĩ2đ‘Ŗ2+â€Ļ+đ‘Ĩ𝑛đ‘Ŗ𝑛
Take the inner product of the first reciprocal basis vector with the vector to be expanded: 𝑟1,𝜒 =đ‘Ĩ1 𝑟1,đ‘Ŗ1 +đ‘Ĩ2 𝑟2,đ‘Ŗ2 +â€Ļ+đ‘Ĩ𝑛 𝑟𝑛,đ‘Ŗ𝑛 By definition of the reciprocal basis vectors: 𝑟1,đ‘Ŗ2 = 𝑟1,đ‘Ŗ3 =â€Ļ= 𝑟1,đ‘Ŗ𝑛 =0 𝑟1,đ‘Ŗ1 =1 Therefore, the first coefficient in the expansion is: đ‘Ĩ1=(𝑟1,𝜒) In general, we then have (even for nonorthogonal basis vectors): đ‘Ĩ𝑗=(𝑟𝑗 ,𝜒)

30 Example đ‘Ŗ1𝑠= ,đ‘Ŗ2𝑠= 1 2 Basis Vectors: đ‘Ĩ𝑠= Vector to Expand:

31 Example (Cont.) Reciprocal Basis Vectors: Expansion Coefficients:
đĢ1= − đĢ2= − Expansion Coefficients: Matrix Form: 𝐱1đ‘Ŗ=đĢ1𝑡𝐱𝑠= − =− 1 2 𝐱đ‘Ŗ=𝐑𝑇𝐱𝑠=𝐁−1𝐱s = − 1 3 − = − 𝐱2đ‘Ŗ=đĢ2𝑡𝐱𝑠= − =1

32 Example (Cont.) Ī‡=0𝑠1+ 3 2 𝑠2=− 1 2 đ‘Ŗ1+1đ‘Ŗ2
The interpretation of the column of numbers depends on the basis set used for the expansion.

33 Linear Transformation
đ‘Ŗ1 đ‘Ŗ2 = 𝑠1 𝑠 = 𝑠1 𝑠2 𝐁 𝑠1 𝑠2 =𝐁−1 v1 đ‘Ŗ2 3 2 𝑠2= 𝑠1 𝑠 = đ‘Ŗ1 đ‘Ŗ2 𝐁− = đ‘Ŗ1 đ‘Ŗ −1 3 − = đ‘Ŗ1 đ‘Ŗ2 − = − 1 2 đ‘Ŗ1+đ‘Ŗ2 𝐱đ‘Ŗ=𝐁−1𝐱𝑠 . This operation, call a change of basis


Download ppt "Signal , Weight Vector Spaces and Linear Transformations"

Similar presentations


Ads by Google