// Compute stopping condition.
if niter % 10 == 0 and verbose == True:
fit = np.log10(sci.linalg.norm(A - Wtemp.dot( Ht.T )))
if niter == 0: fitold = fit
fitchange = abs(fitold - fit)
fitold = fit
if verbose == True:
print("Iteration: %s fit: %s, fitchange: %s" %(niter, fit, fitchange))
After Change
W = Q.dot(W) // Rotate W back to high-dimensional space
violation += _rfhals_update(W, HHt, AHt)
print(violation)
// Project W to low-dimensional space
Wtemp = Q.T.dot(W)