Hi have a matrix A containing 132 elements of 3 features each
A= rand(132,3);
I compute the distance between each element
B=pdist(A);
and I put it in a squared distance matrix
C = squareform(B);
I compute the eigenvectors of the matrix
[V,D] = eig(C);
Now I would like to map a new element in the same space of eigenvectors V.
% I take the first element of A, but I assume it is a new one
new_element = A(1,:);
I calculate the distance with all the other elements of A
D1=pdist2(A(1,:),A);
now I can add this row to the C matrix obtaining
C2 = squareform([D1,B])
What I would like to do now is: given the eigenvector space V
previously calculated. can I approximate the new row of C (i.e the first row of C2) in the same space (i.e. using the eigenvectors of C)?
Not sure what I say makes sense...I am just trying to make a new classifier, but I miss the last passage because I cannot recalculate the eigenvectors (calculated using the training set)