Created
December 4, 2015 02:27
-
-
Save normalhuman/bcd241e58fbf1f83f047 to your computer and use it in GitHub Desktop.
An example of using truncated SVD for latent semantic indexing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A = [0 1 1 0 1 1; 2 1 1 0 3 0; 0 0 0 4 0 2; 3 2 1 0 1 0; 0 0 1 1 0 3] | |
[U,D,V] = svd(A) | |
D2 = D.*(D>=5) | |
A2 = U*D2*V' | |
for j=1:6 disp(A2(1,j)/norm(A2(:,j))); end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment