Information Retrieval - ad-teaching.infor...
Information Retrieval - ad-teaching.infor...
Information Retrieval - ad-teaching.infor...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Octave 3/5• Here are some commands useful for ES#8– Create a vector or matrixA = [1 1 1 0 0; 0 0 1 2 0; 1 0 0 1 1]; // 3 x 5 matrix.– Compute part of SVD pertaining to k top singular values21[U, S, V] = svd(A);[U, S, V] = svds(A, k);– Get a portion of a matrix or vectorUU = U(:, 1:k); // First k columns of U.– Multiply a matrix with its transposeT = UU * UU';// For dense matrices, k = rank(A)// For sparse matrices, must spec. k– Note: if you omit the semicolon or write a comma, the resultwill be printed on the screen