Code covered by the BSD License
-
TCLANEIG(A,n,quality, Anorm, ...
TCLANEIG Compute factor space for specified approx. quality.
-
compute_int(mu,j,delta,eta,LL...
COMPUTE_INT: Determine which Lanczos vectors to reorthogonalize against.
-
lanpro(A,nin,kmax,r,options,....
LANPRO Lanczos tridiagonalization with partial reorthogonalization
-
pythag(y,z)
-
refinebounds(D,bnd,tol1)
REFINEBONDS Refines error bounds for Ritz values based on gap-structure
-
reorth(Q,r,normr,index,alpha,...
REORTH Reorthogonalize a vector using iterated Gram-Schmidt
-
tcdoc_getargs(pnames,dflts,va...
STATGETARGS Process parameter name/value pairs for statistics functions
-
tcslsi(data, varargin)
TCSLSI Sequrntial algorithm of dimension reduction
-
tqlb_matlab(alpha,beta)
TQLB: Compute eigenvalues and top and bottom elements of
-
View all files
from
Sequential Latent Semantic Indexing
by Vital
Sequential version of the latent semantic indexing method
|
| refinebounds(D,bnd,tol1)
|
function [bnd,gap] = refinebounds(D,bnd,tol1)
%REFINEBONDS Refines error bounds for Ritz values based on gap-structure
%
% bnd = refinebounds(lambda,bnd,tol1)
%
% Treat eigenvalues closer than tol1 as a cluster.
% Rasmus Munk Larsen, DAIMI, 1998
j = length(D);
if j<=1
return
end
% Sort eigenvalues to use interlacing theorem correctly
[D,PERM] = sort(D);
bnd = bnd(PERM);
% Massage error bounds for very close Ritz values
eps34 = sqrt(eps*sqrt(eps));
[y,mid] = max(bnd);
for l=[-1,1]
for i=((j+1)-l*(j-1))/2:l:mid-l
if abs(D(i+l)-D(i)) < eps34*abs(D(i))
if bnd(i)>tol1 & bnd(i+l)>tol1
bnd(i+l) = pythag(bnd(i),bnd(i+l));
bnd(i) = 0;
end
end
end
end
% Refine error bounds
gap = inf*ones(1,j);
gap(1:j-1) = min([gap(1:j-1);[D(2:j)-bnd(2:j)-D(1:j-1)]']);
gap(2:j) = min([gap(2:j);[D(2:j)-D(1:j-1)-bnd(1:j-1)]']);
gap = gap(:);
I = find(gap>bnd);
bnd(I) = bnd(I).*(bnd(I)./gap(I));
bnd(PERM) = bnd;
|
|
Contact us at files@mathworks.com