[mlpack-git] [mlpack] Enhance class SoftmaxRegression (#456)
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git