Discussion:
[jira] [Created] (MAHOUT-1895) Add convenience methods for converting Vectors to Scala types
Trevor Grant (JIRA)
2016-12-15 18:08:58 UTC
Permalink
Trevor Grant created MAHOUT-1895:
------------------------------------

Summary: Add convenience methods for converting Vectors to Scala types
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Reporter: Trevor Grant
Priority: Minor


While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2016-12-15 18:42:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752141#comment-15752141 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

GitHub user rawkintrevo opened a pull request:

https://github.com/apache/mahout/pull/262

[MAHOUT-1895] Add convenience methods for converting Vectors to Scala Types

adds the following methods to Vector
.toMap
.toArray

* [x] Add Methods
* [x] Add Tests

Minor Improvement

Relevent JIRA:
[MAHOUT-1895](https://issues.apache.org/jira/browse/MAHOUT-1895)

Requires no license updates


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rawkintrevo/mahout mahout-1895

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/mahout/pull/262.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 #262

----
commit 317eea9d5bbbca3122325b4bf3ee6804d75ca5e6
Author: rawkintrevo <***@gmail.com>
Date: 2016-12-15T18:39:28Z

[MAHOUT-1895] Add convenience methods for converting Vectors to Scala Types

----
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Reporter: Trevor Grant
Priority: Minor
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2016-12-22 18:22:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770725#comment-15770725 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user dlyubimov commented on the issue:

https://github.com/apache/mahout/pull/262

@rawkintrevo there are really two reasons to want toArray(). One is to have its contracts (I guess it is what you are appealing to when you say you want to wrtie summaries etc.) and one is because Array is common part of somebody else's contract.

On reason one, the refute is simple because Vector does all Array contract does, i.e., it has random access contract with exact the same scala signature. Actually it has much more, including things like pretty print that are useful for summaries.

On reason two, it is a more valid case. However, i found that one much more often wants avoid copying memory anyway and that optional array() is much more desired in all of my usecases. It is true i am an algorithm developer and so my use cases are skewed that way. One example would be repackaging of dense matrices and vectors we had in VCL integration. that's what we wanted there -- the optionally supported non-copying array() method. but we did not want a copying method at all since we were repackaging it into native memory anyway. So were some similar other cases.

I am sure you can provide a specific case where you want toArray(), which i suspect might be the motivation where you have to use some other 3rd party contract and then it might be a better shaped argument if you give us some concrete examples of that 3rd party contract you've encountered a need to use.
yes. This is an alternative i would need.

exposing non-copying collection.Map implementation makes sense for RandomAccessSparseVector and whatever other implementations that adhere to Map's promise of O(1) lookup. For Sequential i don't see it as appropriate non-copying for the same very reason -- it violates O(1) contract promise.

In general it has occured to me that I am somehwat more ready to consider toMap, toSeq (and even toArray) that implement correspondent Scala collections because it is consistent with strict Scala collection contract use (i.e., admittance of a copying contract) as long as it is available in Scala only. Regardless, implementation must consider individual underlying structure for the copying efficiency. I.e., it has to use non-default element iterators where appropriate (just like we do with VCL adapting).

But i happen to want implementing collection.Map for random access and optional array() for DenseVector more than the copying contracts.
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2016-12-22 18:30:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770743#comment-15770743 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user dlyubimov commented on the issue:

https://github.com/apache/mahout/pull/262

Another though i had, if you feel strongly going about toMap, toSeq, toArray method support, perhaps you could group it into a separate decorator implementation, similar to JavaCollections._ approach ((say `import MahoutCollections._`), , so that it can be invoked only when needed, but is cleanly separated from the algebra dialects (which are enabled by `import RlikeOps._`). In other words, i don't what RlikeOps to enable this by default.
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2016-12-22 15:54:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770360#comment-15770360 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user rawkintrevo commented on the issue:

https://github.com/apache/mahout/pull/262

Thanks for the comments @dlyubimov . Do you mean we should add a method to expose [this](https://github.com/apache/mahout/blob/master/math/src/main/java/org/apache/mahout/math/DenseVector.java#L29) for dense implementations?

For `SequentialAccessSparseVector` could we [expose the `OrderedIntDoubleMapping`](https://github.com/apache/mahout/blob/master/math/src/main/java/org/apache/mahout/math/SequentialAccessSparseVector.java#L45) underlying and then add a method [to expose `indices` and `values`](https://github.com/apache/mahout/blob/master/math/src/main/java/org/apache/mahout/math/OrderedIntDoubleMapping.java#L26) then zip them into a Map as a convenience.

Similarly for [`Int2DoubleOpenHashMap` backing `RandomAccessSparseVector`] we could [expose `values`](https://github.com/apache/mahout/blob/master/math/src/main/java/org/apache/mahout/math/RandomAccessSparseVector.java#L36) and then using the interface for `it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMap` we could [get the `keySet()`](http://fastutil.di.unimi.it/docs/it/unimi/dsi/fastutil/ints/Int2DoubleOpenHashMap.html#keySet--) and `values` which in turn are [`IntSet`](http://fastutil.di.unimi.it/docs/it/unimi/dsi/fastutil/ints/IntSet.html) and [`DoubleCollection`](http://fastutil.di.unimi.it/docs/it/unimi/dsi/fastutil/doubles/DoubleCollection.html) respectively, however both have `toArray()` methods.

If these are unacceptable, do you have any alternative approaches (and apologies if I entirely missed your point regarding the `DenseVector`s)
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2016-12-22 00:10:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15768549#comment-15768549 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user dlyubimov commented on the issue:

https://github.com/apache/mahout/pull/262
"While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively"
This is, iirc, is not quite true.
only dense vectors can be created from arrays, sparse vectors are explicitly disallowed (or not supported, depends on your take).

So i have a few problems with this.
(1) similarly, if we want to create vector 2 array transformation, it probably should only be allowed for dense vectors only, otherwise it invites misuses.

(2) even when i do need an array out of dense vector, i usually use it without copying (shallowly). In some implementations, it is adding array() method which returns shallow backing array, if any, similarly to ByteBuffer.array(); and in some implementations I am using a reflection to access the private attribute (which is admittedly is a hack). The former is preferred.

Either way, the gist of this point is that one quite more often needs a backing array rather than a copy of such. This implementation forces copy-only approach. Note that ByteBuffer doesn't have copying implementation (.toArray()) and only has backing array access (array()) for perhaps the same reasons. Inviting misuse and inefficiency.

(3) Assuming (1) and (2) are overcome, this implementation is still suboptimal for sparse implemetnations.
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2016-12-20 18:52:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo updated MAHOUT-1895:
-----------------------------------
Sprint: Jan/Feb-2017
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2016-12-31 22:06:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo reassigned MAHOUT-1895:
--------------------------------------

Assignee: Andrew Palumbo (was: Trevor Grant)
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Andrew Palumbo
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2016-12-31 22:07:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on MAHOUT-1895 started by Andrew Palumbo.
----------------------------------------------
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Andrew Palumbo
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2016-12-31 22:07:58 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo updated MAHOUT-1895:
-----------------------------------
Assignee: Trevor Grant (was: Andrew Palumbo)
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2017-01-16 02:28:28 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo updated MAHOUT-1895:
-----------------------------------
Sprint: Jan/Feb-2016 (was: Jan/Feb-2017)
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Andrew Palumbo (JIRA)
2017-01-16 02:28:29 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Palumbo updated MAHOUT-1895:
-----------------------------------
Sprint: Jan/Feb-2017 (was: Jan/Feb-2016)
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2017-01-16 06:02:26 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823498#comment-15823498 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user andrewpalumbo commented on the issue:

https://github.com/apache/mahout/pull/262

+1 from me
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2017-01-16 06:06:26 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823503#comment-15823503 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user rawkintrevo commented on the issue:

https://github.com/apache/mahout/pull/262

@dlyubimov per your comments- I moved to `MahoutCollections`.
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
ASF GitHub Bot (JIRA)
2017-01-17 03:19:26 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15824887#comment-15824887 ]

ASF GitHub Bot commented on MAHOUT-1895:
----------------------------------------

Github user asfgit closed the pull request at:

https://github.com/apache/mahout/pull/262
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Hudson (JIRA)
2017-01-17 03:56:26 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15824908#comment-15824908 ]

Hudson commented on MAHOUT-1895:
--------------------------------

FAILURE: Integrated in Jenkins build Mahout-Quality #3409 (See [https://builds.apache.org/job/Mahout-Quality/3409/])
MAHOUT-1895 Add convenience methods for converting Vectors to Scala (rawkintrevo: rev 84e90ed23327355f92abeb4aede8f3a9ee5b5867)
* (add) math-scala/src/main/scala/org/apache/mahout/math/scalabindings/MahoutCollections.scala
* (add) math-scala/src/test/scala/org/apache/mahout/math/scalabindings/MahoutCollectionsSuite.scala
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Trevor Grant (JIRA)
2017-01-21 05:46:26 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trevor Grant resolved MAHOUT-1895.
----------------------------------
Resolution: Fixed
Post by Trevor Grant (JIRA)
Add convenience methods for converting Vectors to Scala types
-------------------------------------------------------------
Key: MAHOUT-1895
URL: https://issues.apache.org/jira/browse/MAHOUT-1895
Project: Mahout
Issue Type: Bug
Affects Versions: 0.12.2
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Fix For: 0.13.0
While dense and sparse vectors may be created from `TraversableOnce[Double]` such as `Array[Double]` and `TraversableOnce[(Int, AnyVal)]` such as `Map[Int,Double]` respectively. Converting back into this format is somewhat tedious. We should add convenience methods to take care of this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Loading...