I have a "training set" of images. I have formed the 'Eigenspace'. Now i need to label the projections to train the SVM. The projections of "face 1" to the Eigenspace has to be labelled +1 and the projections of all the other faces to the Eigenspace has to be labelled -1.
I don't know how to do this.Any suggestions would be really helpful!
I formed the eigenspace using the following :
function [signals,V] = pca2(data)
[M,N] = size(data);
data = reshape(data, M*N,1); % subtract off the mean for each dimension
mn = mean(data,2);
data = bsxfun(@minus, data, mean(data,1));
% construct the matrix Y
Y = data'*data / (M*N-1);
[V D] = eigs(Y, 10); % reduce to 10 dimension
% project the original data
signals = data * V;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…