m(yhat ~= ytest)
</pre><pre class="codeoutput">lrL1Nerrors =
     4
</pre><h2>LR L2 (no kernel)<a name="4"></a></h2><pre class="codeinput">lambdas = logspace(-5,0,50);
LRL2model = fitCv(lambdas, @(X, y, l)logregFit(X, y, <span class="string">'lambda'</span>, l, <span class="string">'regType'</span>, <span class="string">'L2'</span>), <span class="keyword">...</span>
    @logregPredict, @zeroOneLossFn, Xtrain, ytrain);


yhat = logregPredict(LRL2model, Xtest);
lrL2Nerrors = sum(yhat ~= ytest)
</pre><pre clas