Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: S.M. Sajjadi Islamic Azad University, Parsian Branch, Parsian,Iran.

Similar presentations


Presentation on theme: "By: S.M. Sajjadi Islamic Azad University, Parsian Branch, Parsian,Iran."— Presentation transcript:

1

2 By: S.M. Sajjadi Islamic Azad University, Parsian Branch, Parsian,Iran

3

4

5 ScalarVector a = a (I×1) = Matrix A (I×J) = Three-way array A (I×J×K) =

6 c1c1 EEM c2c2 280 290 300 21.6 8.64 2.7 50.4 20.16 6.3 36 14.4 4.5 28.8 11.52 3.6 320 340 360 380 280 290 300 320 340 360 380 14.4 5.76 1.8 33.6 13.44 4.2 24 9.6 3 19.2 7.68 2.4

7 21.6 8.64 2.7 50.4 20.16 6.3 36 14.4 4.5 28.8 11.52 3.6 14.4 5.76 1.8 33.6 13.44 4.2 24 9.6 3 19.2 7.68 2.4 Constructing Three-way Data Array by Stacking Two-way Data For two-way arrays it is useful to distinguish between special parts of the array, such as rows and columns. What are spatial parts in the three-way array? X( :, :, 1 ) = X1 X( :, :, 2 ) = X2 X(4×3×2) X(2×4×3)?? X(4×2×3)??

8 Rows, Columns and Tubes Row Tube Column 2 3 4

9 2 3 4 x jk (4×1) X( :, j, k ) Rows, Columns and Tubes Column

10 2 3 4 x jk (4×1) x ik (3×1) X( i, :, k )X( :, j, k ) Rows, Columns and Tubes Row Column

11 2 3 4 x jk (4×1) x ij (2×1) X( i, j, : ) x ik (3×1) X( i, :, k )X( :, j, k ) Rows, Columns and Tubes Row Tube Column

12 2 3 4 Horizental Vertical

13 2 3 4 X( i, :, : ) Horizental

14 Vertical X( :, j, : ) 2 3 4 X( i, :, : ) Horizental

15 X( :, :, k ) 3 2 4 Vertical X( i, :, : ) Horizental X( :, j, : )

16 There are five EEMs of different samples that contain two analytes.

17 2 3 4

18 2 3 4 4 3

19 2 3 4 X( :, : ) 4 63

20 2 4 4 6 permute ( X, [1 3 2] ) X ( :, : ) 4 2 3 ?? 4 63 3 ? 4 62

21 2 3 4 Matrisizing : X ( :, : ) 3 8 2 permute ( X, [2 …)

22 There are five EEMs of different samples that contain two analytes. Please construct three kinds of three-way data array, i.e., consider each EEM as frontal, horizontal and vertical slices.

23 Vector multiplication a T b = scalar:  Inner product = scalar = I I  Outer product = Martix = I J I J

24 Vec-operator Vec of matrix A is the IJ vector AB = matrix = I J J K I K vectorized.......... IJ

25 Kronecker product Hadamard product Khatri–Rao product * Tucker Weighted PARAFAC PARAFAC 

26 AB = 3 B3 B 4 B4 B 7 B7 B 3 B3 B 5 B5 B 8 B8 B 4 B4 B 12 B 3×4× 7×3× 5×8× 4×12× = kron(A,B)

27 AB = 3 B3 B 4 B4 B 7 B7 B 3 B3 B 5 B5 B 8 B8 B 4 B4 B 12 B =

28 A(I×J) B(K×M),

29 3 7 5 4 4 3 8 12 A= 4 1.6 0.5 1.2 3.6 4.9 B = A 3× 4 1.6 0.5 7× 4 1.6 0.5 5× 4 1.6 0.5 4× 4 1.6 0.5 1.2 3.6 4.9 4× 1.2 3.6 4.9 3× 1.2 3.6 4.9 8× 1.2 3.6 4.9 12× = kron(A(:,1),B(:,1))  kron(A(:,2),B(:,2))

30 A and B are partitioned matrices with an equal number of partitions. A =[a 1, a 2,…, a n ] B =[b 1, b 2,…, b n ];. A B =

31 Hadamard or element wise product, which is defined for matrices A and B of equal size ( I × J )

32 += K J I K J I K J I

33 -= K J I K J I K J I

34 K J I + E A B C Q G P R I J K

35 K J I = + E A B C N N N XkXk A B 2 2 = c k1 If N=2: c k2

36 Horizental Slices Vertical Slices Frontal Slices X k = AD k B = c k1 a 1 b 1 + c k2 a 2 b 2 Across all slices X k, the components a r and b r remain the same, only their weights d k1,..., d k2 are different. XkXk A B 2 2 = DkDk

37 There are excitation, emission and concentration matrix of two analytes.

38 = = X Sensitivity Matrix C S S = C + X Calibration step: Prediction Step: c = S + x

39 Frontal Slices X k = AD k B = c k1 a 1 b 1 + ·· ·+c kR a R b R We need to estimate the parameters A and B of the calibration model, which we can then use for future predictions.

40 Sample1: [c 11 c 12 ] Z (1) (4×3) Sample2: [c 21 c 22 ] Z (2) (4×3) 1.Vectorizing of Matrices........ Sample3: [c 31 c 32 ] Z (3) (4×3)

41 2. Folding of Vectorized Matrices Folding 3. Obtaining Sensitivity Matrix = S = C + X  For unknown matrix Z 0 calculate

42 Only contribution of first component Only contribution of another of component Matricized SVD a1,b1a1,b1 a2,b2a2,b2 K J I = A B 2 2 2 C

43 b1b1 I J a1a1 b2b2 I J a2a2. A B =

44 Alternating least squares PARAFAC algorithm Algorithms for fitting the PARAFAC model are usually based on alternating least squares. This is advantageous because the algorithm is simple to implement, simple to incorporate constraints in, and because it guarantees convergence. However, it is also sometimes slow.

45  The PARAFAC algorithm begins with an initial guess of the two loading modes The solution to the PARAFAC model can be found by alternating least squares (ALS) by successively assuming the loadings in two modes known and then estimating the unknown set of parameters of the last mode.  Determining the rank of three-way array

46  Suppose initial estimates of B and C loading modes are given = K J I Matricizing I JK I N N

47 K N C N Khatri-Rao = I JK N I A = XZ + N B N J C  B=Z A

48 X (I×J×K)X (J×IK) B =X Z B + = J IK N J N Matricizing X (J×IK) = B (J×N) (C  A) T = B Z B T

49 X (I×J×K)X (K×IJ) = K IJ N K IKN Matricizing C =X Z C + X (K×IJ) = C (K×N) (B  A) T = C Z C T

50 5. Go to step 1 until relative change in fit is small. 4-1. Reconstructing Three-way Array from obtained A and B and C profiles 4-2. Calculating the norm of residual array

51 Initialize B and C 2 A = X (I×JK ) Z A (Z A Z A ) −1 3 B = X (J×IK ) Z B (Z B Z B ) −1 4 C = X (K×JI ) Z C (Z C Z C ) −1 Given: X of size I × J × K Go to step 1 until relative change in fit is small 5 ZA=CBZA=CB ZB=CAZB=CA ZC=BAZC=BA

52  Please simulate a Three-way data by these matrices. There are excitation, emission and concentration matrix of two analytes.  Please do Khatri-Rao product of excitation and emission matrix.

53  Requires excessive memory  An updating scheme by Harshman and Carroll and Chang o Slow convergence

54 با سپاس


Download ppt "By: S.M. Sajjadi Islamic Azad University, Parsian Branch, Parsian,Iran."

Similar presentations


Ads by Google