= sum(yhat~=y)/length(y)

figure;
plotClassifier(X,y,wSoftmax,<span class="string">'Multinomial Logistic Regression'</span>);
</pre><pre class="codeoutput">Training multinomial logistic regression model...
trainErr =
   0.003000000000000
</pre><img vspace="5" hspace="5" src="logregMultinomMinfuncDemo_01.png" alt=""> <p class="footer"><br>
      Published with MATLAB&reg; 7.12<br></p></div><!--
##### SOURCE BEGIN #####
%% Minfunc Logreg Demo
%PMTKauthor Mark Schmidt
%PMTKurl  http://people.cs.ubc.ca/~schmidt