Instagram Cheat Sheet

PDF Publication Title:

Instagram Cheat Sheet ( instagram-cheat-sheet )

Previous Page View | Next Page View | Return to Search List

Text from PDF Page: 106

84 4 ⋅ random alpha pagerank Program 6 – Computing RAPr with path-damping. The first subfigure presents a compact algo- rithm to compute the moments of a Beta distribution. Next, we present our implementation of the path damping algorithms using the moments. Just as for the PageRank case, we perform our computations with P = PT for efficiency. 1 2 3 4 5 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (a) Moment computation function m=beta_moments(N,a,b,l,r) c = l; s = (r-l); m=zeros(N+1,1); % c is the offset, s is the scale uk=1; k=0; sk=1; m(1) = uk; % uk are the Beta(a,b,0,1) moments for i=1:N, k = k+1; uk=s*uk*((b+k)/(a+b+k+1)); m(i+1) = uk; end % form the shifted and scaled moments % m are the Beta(a,b,l,r) moments if c ≠ 0, for i=1:N, m(i+1:end) = c*m(i:(end-1)) + m((i+1):end); end, end (b) Path damping computation function [ex,stdx] = pdrapr(P,N,a,b,l,r) tol=1e-9; maxterms=500; n=size(P,1); v=1/n; ms = beta_moments(2*(maxterms+1),a,b,l,r); i=0; delta=2; ex=zeros(n,1); y = zeros(n,1) + v; s=0; while itol Ptiv=y; ex = ex + (ms(i+1)-ms(i+2))*Ptiv; % setup the moments % setup vectors y = P’*(Ptiv); y = y + (1-norm(y,1)).*v; i=i+1; end % update P^i v ex = ex + ms(i+2)*y; % adjust with the last term % compute stdx with same number of terms of sequence nterms=i; ex2=zeros(n,1); Ptiv = zeros(n,1); Ptiv=Ptiv+v; Ptjv=Ptiv; for i=0:nterms, for j=0:nterms ex2 = ex2 + (ms(i+j+1)-2*ms(i+j+2)+ms(i+j+3))*(Ptiv.*Ptjv); y end y= = P’*(Ptjv); Ptjv = y + (1-norm(y,1)).*v; P’*(Ptiv); Ptiv = y + (1-norm(y,1)).*v; Ptjv(:)=0; Ptjv=Ptjv+v; 16 end 17 stdx = sqrt(ex2-ex.^2); Program 7 – Matlab code for computing RAPr using Gaussian quadrature. Using Gautschi’s OPQ codes, r_jacobi01.m and gauss.m, a Matlab quadrature implementation is quite easy. 1 function [ex,stdx] = gqrapr(P,N,a,b,l,r) 2 % first run these commands to get the OPQ codes 3 % urlwrite(’http://www.cs.purdue.edu/archives/2002/wxg/codes/gauss.m’,’gauss.m’) 4 % urlwrite(’http://www.cs.purdue.edu/archives/2002/wxg/codes/r_jacobi.m’,’r_jacobi.m’) 5 % urlwrite(’http://www.cs.purdue.edu/archives/2002/wxg/codes/r_jacobi01.m’,’r_jacobi01.m’) 6 tol=1e-9; maxit=1000; n=size(P,1); v=1/n; 7 ab=r_jacobi01(N,a,b); xw=gauss(N,ab); xw(:,2) = (1./beta(b+1,a+1))*xw(:,2); 8 xw(:,1) = (r-l).*xw(:,1)+l; % generate the quadrature rule by scale and shift 9 ex = zeros(n,1); stdx = zeros(n,1); % initialize running sums 10 for i=1:N 11 % solve the PageRank system 12 x = inoutpr(P,xw(i,1),v,min(tol./xw(i,2),1e-2), ... % adjust tol and maxit 13 2*ceil(log(min(tol./xw(i,2),1e-2))/log(xw(i,1))));% for mult by xw(i,2) 14 ex = ex+xw(i,2).*x; stdx = stdx+xw(i,2).*(x.^2); 15 end 16 stdx = sqrt(stdx - ex.^2); % convert to stdx % now update Ptiv and reset Ptjv % finish by update ex2 to be stdx

PDF Image | Instagram Cheat Sheet

PDF Search Title:

Instagram Cheat Sheet

Original File Name Searched:

pagerank-sensitivity-thesis-online.pdf

DIY PDF Search: Google It | Yahoo | Bing

Cruise Ship Reviews | Luxury Resort | Jet | Yacht | and Travel Tech More Info

Cruising Review Topics and Articles More Info

Software based on Filemaker for the travel industry More Info

The Burgenstock Resort: Reviews on CruisingReview website... More Info

Resort Reviews: World Class resorts... More Info

The Riffelalp Resort: Reviews on CruisingReview website... More Info

CONTACT TEL: 608-238-6001 Email: greg@cruisingreview.com (Standard Web Page)