You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Frank Dai (JIRA)" <ji...@apache.org> on 2016/09/05 06:48:20 UTC
[jira] [Created] (SPARK-17400) MinMaxScaler.transform() outputs DenseVector by default, which causes poor performance
Frank Dai created SPARK-17400:
---------------------------------
Summary: MinMaxScaler.transform() outputs DenseVector by default, which causes poor performance
Key: SPARK-17400
URL: https://issues.apache.org/jira/browse/SPARK-17400
Project: Spark
Issue Type: Improvement
Components: ML, MLlib
Affects Versions: 2.0.0, 1.6.2, 1.6.1
Reporter: Frank Dai
MinMaxScaler.transform() outputs DenseVector by default, which will cause poor performance and consume a lot of memory.
The most important line of code is the following:
https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/feature/MinMaxScaler.scala#L195
I suggest that the code should calculate the number of non-zero elements in advance, if the number of non-zero elements is less than half of the total elements in the matrix, use SparseVector, otherwise use DenseVector
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org