[
https://issues.apache.org/jira/browse/SPARK-6948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394120#comment-15394120
]
Max Moroz commented on SPARK-6948:
----------------------------------
Should this be a parameter for `transform` method of the VectorAssembler
instance (with the current behavior used as default)? For example, I saw people
struggle with the `SparseVector` output from VectorAssembler when they wanted
to later apply `StandardScaler` with de-meaning. They will end up with an
unnecessary roundtrip conversion between `DenseVector` and `SparseVector`.
I *think* a similar extra conversion would occur if they later extract some of
the features from `VectorAssembler` output, and combine with other features
that happen to be dense. In that case, if the user knows in advance that
`DenseVector` would be required, they might choose to go with it from the
beginning.
> VectorAssembler should choose dense/sparse for output based on number of zeros
> ------------------------------------------------------------------------------
>
> Key: SPARK-6948
> URL: https://issues.apache.org/jira/browse/SPARK-6948
> Project: Spark
> Issue Type: Improvement
> Components: MLlib
> Affects Versions: 1.4.0
> Reporter: Xiangrui Meng
> Assignee: Xiangrui Meng
> Priority: Minor
> Fix For: 1.4.0
>
>
> Now VectorAssembler only outputs sparse vectors. We should choose
> dense/sparse format automatically, whichever uses less memory.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]