* condition
The dependant variable has only one component
* variables
X : matrix, independant variables, (the # of samples by # of dim.)
mx : vector, mean vector of matrix X (one by # of dim.)
y : vector, dependant variables, (the # of samples by one)
my : scalar, mean of vector y.
Xt : matrix, transpose of matrix X, ( the # of dim. by the # of samples)
w : vector, auxiliary weight vector, ( the # of dim. by one)
t : vector, factor coefficient vector, ( the # of sample by one)
p : vector, loading vector, ( the # of dim. by one )
q : scalar
b : vector, PLS factors, (the # of dim. by one)
bo : scalar, PLS factor
* procedure
1. mean centering
1.1. mx = mean(X)
1.2. X_{0} = X - expand(mx)
1.3. my = mean(y)
1.4. y_{0} = y - expand(y)
2. scoring (loop i to n)
2.1. Xt = transpose(X_{i})
2.2. w = Xt_{i}*y_{i}
2.3. w = w/norm(w)
2.4. t = X_{i}*w
2.5. p = Xt*t
2.6. p = p/norm(t)
2.7. q = y_{i}*t
2.8. q = q/norm(t)
2.9. X_{i+1} = X_{i}-t*p
2.10. y_{i+1} = y_{i}-t*q
3. compute PLS factor
3.1. pt=transpose(p)
3.2. b = w*inverse(pt*w)*q ; inverse(pt*w) is likely to /(pt*w)
3.3. b0 = my-mx*b
댓글 없음:
댓글 쓰기