itializeq(K),q(?L)andq(σ) Forallm,n,E[k]=K(m,n),V[k]=10. Foralli,j,E[l]=?L(i,j),V[l]=10. E[σ]=1; %Setinitialnoiselevel ψ={E[σ],E[k],E[k],E[l],E[l]} %Initialdistribution repeat ψ=Update(ψ,?L,θ, θ) %Getnewdistribution ?ψ=ψ-ψ%Getupdatedirection α=argmin αC(ψ+α·?ψ) %Linesearch %putedusing[Miskin2000b],Eqn.’s3.37–3.39 ψ=ψ+α·?ψ%Updatedistribution untilConvergence:?C <5×10 K =E[k],?L =E[l]. %Maxmarginals Output:K and?L . ψ=functionUpdate(ψ,?L,θ, θ) %Sub-puteoptimalupdate %ponenttoposterior u = πλe λ;w = πe / √v u =u /∑ u ;w =w/∑ w σσλσσ a=10 +∑(?P?(K??L));b=10 +IJ/2 %S.S.forq(σ) %Updateparametersofq(K) Semi-analyticform:see[Miskin2000b],page199,EqnsA.8andA.9 E[l]=l/l;E[l]=(l/l)+1/l. %Updateparametersofq(?L) E[ σ]=b/a. %Updateparametersofq( σ) ψ={E[σ],E[k],E[k],E[l],E[l]} %Collectupdates Return: ψ