[
https://issues.apache.org/jira/browse/FLINK-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133988#comment-15133988
]
ASF GitHub Bot commented on FLINK-3330:
---------------------------------------
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/1587#discussion_r52001489
--- Diff:
flink-libraries/flink-ml/src/main/scala/org/apache/flink/ml/optimization/GradientDescent.scala
---
@@ -192,10 +190,18 @@ abstract class GradientDescent extends
IterativeSolver {
(left, right) =>
val (leftGradVector, leftCount) = left
val (rightGradVector, rightCount) = right
- // Add the left gradient to the right one
- BLAS.axpy(1.0, leftGradVector.weights, rightGradVector.weights)
+
+ // make the left gradient dense so that the following reduce
operations (left fold) reuse
+ // it. This strongly depends on the underlying implementation of
the ReduceDriver
--- End diff --
The reduce is implemented somewhat like a left fold operation, just without
having an initial value. Thus you should not convert the right element, because
it will always be the newly read input element.
> Add SparseVector support to GradientDescent in FlinkML
> ------------------------------------------------------
>
> Key: FLINK-3330
> URL: https://issues.apache.org/jira/browse/FLINK-3330
> Project: Flink
> Issue Type: Improvement
> Components: Machine Learning Library
> Affects Versions: 1.0.0
> Reporter: Chiwan Park
> Assignee: Till Rohrmann
>
> A user reported the problem using {{GradientDescent}} algorithm with
> {{SparseVector}}.
> (http://mail-archives.apache.org/mod_mbox/flink-user/201602.mbox/%3CCAMJxVsiNRy_B349tuRpC%2BY%2BfyW7j2SHcyVfhqnz3BGOwEHXHpg%40mail.gmail.com%3E)
> It seems lack of SparseVector support in {{BLAS.axpy}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)