MATLAB- principal-component analysis

profileboboo
Assignment3Hints.pdf

Biometric Identification and Verification Seminar

Assignment 3 - Hints

1. Some linear algebra: If 𝒙 is a vector in a 5-dim space ℝ5, 𝒀 is a 5×2 matrix of two 5-

dimensional basis vectors 𝒚(1) and 𝒚(2) of a (2-dimensional) subspace, and the 2-

dimensional vector �̃� is the projection of 𝒙 into that subspace then �̃� = 𝒀𝑡 (𝒙 − 𝝁𝒙).

2. Some Matlab: In your assignment, you have to project eight (in fact 9) 3500-dimensional

vectors into a 7-dimensional subspace, and you may already guess that you don’t have

to write a for loop with eight iterations. The first step is to normalise the training vectors

by subtracting their mean from each one of them. For this, the Matlab function

repmat(X,I,j) is convenient. If X is the (3500×8) matrix of the training vectors, you

can replicate the (3500×1) mean vector mu 8 times horizontally by calling

repmat(mu,1,8) and do all 3500×8 subtractions in one go.

3. To be continued…