spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evanzamir <zamir.e...@gmail.com>
Subject How to convert an ArrayType to DenseVector within DataFrame?
Date Tue, 30 Aug 2016 18:45:26 GMT
I have a DataFrame with a column containing a list of numeric features to be
used for a regression. When I run the regression, I get the following error:

*pyspark.sql.utils.IllegalArgumentException: 'requirement failed: Column
features must be of type org.apache.spark.ml.linalg.VectorUDT@3bfc3ba7 but
was actually ArrayType(DoubleType,true).'
*
It would be nice if Spark could automatically convert the type, but assuming
that isn't possible, what's the easiest way for me to do the conversion?



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/How-to-convert-an-ArrayType-to-DenseVector-within-DataFrame-tp27625.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org


Mime
View raw message