5
 Final f = 9.743869e-01 

ans =

     1

</pre><h2 id="10">Changing the output frequency</h2><p>Using the <tt>'printitn'</tt> option to change the output frequency.</p><pre class="codeinput">M2alt2 = cp_als(X,3,<span class="string">'maxiters'</span>,100,<span class="string">'init'</span>,U2,<span class="string">'printitn'</span>,10);
</pre><pre class="codeoutput">
CP_ALS:
 Iter 10: f = 7.398597e-01 f-delta = 8.5e-03
 Iter 20: f = 8.518580e-01 f-delta = 3.0e-03
 Iter 30: f = 9.058962e-01 f-delta = 7.5e-03
