[mlpack-git] [mlpack] Enhance class SoftmaxRegression (#456)

Ryan Curtin notifications at github.com
Mon Sep 28 17:28:26 EDT 2015


Okay, I made some simple changes in cbeb3ea..f85a9b2; let me know if you see anything wrong.  If you are interested, here are some future possibilities for refactoring/improving the SoftmaxRegression code further:

 * 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).

 * The type of label would be better as `arma::Row<size_t>` not `arma::vec`.

 * The `InitializeWeights()` function could be made static or moved elsewhere so that creating a `SoftmaxRegressionFunction` to initialize the weights in the non-training constructor isn't necessary.

 * A `softmax_regression_main.cpp` program could be written that could allow users to use softmax regression from the command line.

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

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/456#issuecomment-143879456
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150928/a4c55148/attachment.html>


More information about the mlpack-git mailing list