Github user mktal commented on a diff in the pull request:
https://github.com/apache/incubator-madlib/pull/75#discussion_r87918714
--- Diff: src/modules/convex/algo/igd.hpp ---
@@ -86,6 +101,32 @@ IGD<State, ConstState, Task>::merge(state_type &state,
template <class State, class ConstState, class Task>
void
+IGD<State, ConstState, Task>::mergeInPlace(state_type &state,
--- End diff --
Hi Aaron, it is great to receive your comment so quickly!:) Yes, you are
correct that I can re-use the old transition and merge function if we keep
another copy of the model as algo.incrModel. I decided to get rid of incrModel
and update task.model in place because there is no need, algorithm-wise, to
compute the loss and gradient across the whole epoch since we dont use
line-search or other global mechanism here. In fact, I dont even keep the
gradient around since I dont see the point of exposing the gradient to the end
user. In this way, we save two thirds of the space required by the state and
can potentially solve larger problems. Now, I understand there is code
redundancy in transitionInPlace and mergeInPlace and I am open to discussion
whether we should just factor them into a separate class.
---
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.
---