[mlpack-git] [mlpack] Enhance SoftmaxRegression (#457)

Ryan Curtin notifications at github.com
Wed Sep 30 09:26:41 EDT 2015


> @@ -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);

I think for now I'll go with `weights` 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.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/457/files#r40792344
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150930/1b94607c/attachment.html>


More information about the mlpack-git mailing list