[
https://issues.apache.org/jira/browse/FLINK-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602662#comment-14602662
]
ASF GitHub Bot commented on FLINK-2278:
---------------------------------------
GitHub user ChristophAl opened a pull request:
https://github.com/apache/flink/pull/869
[FLINK-2278] [ml] changed Vector fromBreeze
fromBreeze now takes the actual dimensionality instead of the non-zero
elements as size
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ChristophAl/flink sparsevector
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/869.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #869
----
commit 47ed71dad80a606129d82cc9bac997a2e44f65c2
Author: Christoph Alt <[email protected]>
Date: 2015-06-26T10:17:32Z
[FLINK-2278] [ml] changed Vector fromBreeze
fromBreeze now takes the actual dimensionality instead of the non-zero
elements as size
----
> SparseVector created from Breeze Sparsevector has wrong size
> ------------------------------------------------------------
>
> Key: FLINK-2278
> URL: https://issues.apache.org/jira/browse/FLINK-2278
> Project: Flink
> Issue Type: Bug
> Reporter: Christoph Alt
> Labels: ML
>
> The following code doesn't return true when testing equality of two
> SparseVectors, one converted from a Breeze SparseVector.
> {code}
> val flinkVector = SparseVector.fromCOO(3, (1, 1.0), (2, 2.0))
> val breezeVector = linalg.SparseVector(3)(1 -> 1.0, 2 -> 2.0)
> flinkVector.equalsVector(breezeVector.fromBreeze)
> {code}
> The reason is that *fromBreeze* takes the number of non-zero elements
> *SparseVector.used* as size when creating a SparseVector instead of the
> dimensionality *SparseVector.length*.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)