Github user takuti commented on the issue:
https://github.com/apache/incubator-hivemall/pull/79
I supported `-mini_batch` option for
[regressor](https://github.com/takuti/incubator-hivemall/blob/c3b89f8a671a1ccf7a0c19e9f061d61c6e0c2807/core/src/main/java/hivemall/regression/GeneralRegressionUDTF.java#L121-L181)
and
[classifier](https://github.com/takuti/incubator-hivemall/blob/c3b89f8a671a1ccf7a0c19e9f061d61c6e0c2807/core/src/main/java/hivemall/classifier/GeneralClassifierUDTF.java#L122-L182)
(same code).
The idea is just accumulating `new_weight` obtained from
`optimizer.update()`. Once `miniBatchSize` samples are observed, a mean value
of the accumulated `new_weight` will be set to a model via `model.setWeight`.
For SGD, it's clearly equivalent to [what RegressorBaseUDTF
does](https://github.com/takuti/incubator-hivemall/blob/5dc6f4eb5a8d8532201f6706673e2381d47d7e70/core/src/main/java/hivemall/regression/RegressionBaseUDTF.java#L247-L251).
However, I'm a little bit afraid if I can do the same thing for Adagrad, Adam,
Adadelta and AdagradRDA. (Currently, doing the same thing for Adagrad, Adam and
Adadelta are allowed. By contrast, AdagradRDA + `-mini_batch` option is not
supported.)
BTW, practically, I observed that the naive Adagrad + `-mini_batch`
implementation seems to work correctly as shown in the next comment:
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---