<p>In <a href="https://github.com/mlpack/mlpack/pull/457#discussion_r40664268">src/mlpack/methods/softmax_regression/softmax_regression.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -141,13 +140,8 @@ class SoftmaxRegression
&gt;     * @param numClasses Number of classes for classification.
&gt;     * @return Objective value of the final point.
&gt;     */
&gt; -  double Train(const arma::mat &amp;data, const arma::vec&amp; labels,
&gt; -               const size_t numClasses);
&gt; -
&gt; -  //! Sets the size of the input vector.
&gt; -  size_t&amp; InputSize() { return inputSize; }
&gt; -  //! Gets the size of the input vector.
&gt; -  size_t InputSize() const { return inputSize; }
</pre>
<p>Hm, I think maybe it would be useful to keep <code>InputSize()</code>, because the length of the parameters vector may differ depending on the value of <code>fitIntercept</code>.  Maybe:</p>

<pre><code>size_t InputSize() const { return (fitIntercept ? parameters.n_rows - 1 : parameters.n_rows); }
</code></pre>

<p>This doesn't allow the users to set the input size or anything (that can be done by re-training or other means), but it does allow the users to determine what the correct size of their input vectors should be.  What do you think?</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/457/files#r40664268">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFHCi0QiYanex9RwgQ6VJlJ4c5I82ks5o2nrzgaJpZM4GFbCy.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/457/files#r40664268"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>