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

stereomatchingkiss notifications at github.com
Tue Sep 29 10:05:16 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);

Ah, I can not find any information about rvalue reference being used by Armadillo.

This function do not looks like performance critical part, but the optimization(pass by reference) is quite easy to do.
I like the api of return value more since it do not have any site effect, but pass by reference may get better performance in this case. Maybe provide both of them?

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


More information about the mlpack-git mailing list