<p>Okay, I made some simple changes in <a href="https://github.com/mlpack/mlpack/commit/cbeb3ea17262b7c5115247dc217e316c529249b7" class="commit-link"><tt>cbeb3ea</tt></a>..<a href="https://github.com/mlpack/mlpack/commit/f85a9b22f3ce56143943a2488c05c2810d6b2bf3" class="commit-link"><tt>f85a9b2</tt></a>; let me know if you see anything wrong.  If you are interested, here are some future possibilities for refactoring/improving the SoftmaxRegression code further:</p>

<ul>
<li><p>Storing inputSize and numClasses is, I think, redundant, and I think you can just get these from the parameters matrix.  So the constructors can be cleaned up a little (although numClasses will still be necessary in the constructor).</p></li>
<li><p>The type of label would be better as <code>arma::Row&lt;size_t&gt;</code> not <code>arma::vec</code>.</p></li>
<li><p>The <code>InitializeWeights()</code> function could be made static or moved elsewhere so that creating a <code>SoftmaxRegressionFunction</code> to initialize the weights in the non-training constructor isn't necessary.</p></li>
<li><p>A <code>softmax_regression_main.cpp</code> program could be written that could allow users to use softmax regression from the command line.</p></li>
</ul>

<p>Don't feel obligated to do any of these -- I'm just tossing them out there as ideas. :)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/456#issuecomment-143879456">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAhV2_8PFK22_i2ZLcUcqibm48Ukks5o2ah6gaJpZM4GEofU.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/456#issuecomment-143879456"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>