<p>In <a href="https://github.com/mlpack/mlpack/pull/457#discussion_r40792344">src/mlpack/methods/softmax_regression/softmax_regression_function.hpp</a>:</p>
<pre style='color:#555'>> @@ -38,12 +37,25 @@ class SoftmaxRegressionFunction
> const arma::mat InitializeWeights();
>
> /**
> + * Initialize Softmax Regression weights(trainable parameters) with
> + * the given parameters.
> + * @param featureSize The features size of the training set
> + * @param numClasses Number of classes for classification.
> + * @param fitIntercept Intercept term flag.
> + * @return weights after initialize
> + */
> + static const arma::mat InitializeWeights(const size_t featureSize,
> + const size_t numClasses,
> + const bool fitIntercept = false);
</pre>
<p>I think for now I'll go with <code>weights</code> as a parameter (in part for consistency with other code), but if you run some quick simulations to determine that gcc and clang are doing RVO correctly here, we can change it.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/457/files#r40792344">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFHpDujWZWS5ypfauhPqvKhQ62_8_ks5o29qRgaJpZM4GFbCy.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#r40792344"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>