43928e-01 f-delta = 9.2e-05
 Final f = 9.743928e-01 

ans =

    1.0000

</pre><h2 id="16">Change the tolerance</h2><p>It's also possible to loosen or tighten the tolerance on the change in the fit. You may need to increase the number of iterations for it to converge.</p><pre class="codeinput">M5 = cp_als(X,3,<span class="string">'init'</span>,<span class="string">'nvecs'</span>,<span class="string">'tol'</span>,1e-6,<span class="string">'maxiters'</span>,1000,<span class="string">'printitn'</span>,10);
</p