I am using Spark cluster 2.0 and I would like to convert a vector from org.apache.spark.mllib.linalg.VectorUDT
to org.apache.spark.ml.linalg.VectorUDT
.
# Import LinearRegression class
from pyspark.ml.regression import LinearRegression
# Define LinearRegression algorithm
lr = LinearRegression()
modelA = lr.fit(data, {lr.regParam:0.0})
Error:
u'requirement failed: Column features must be of type org.apache.spark.ml.linalg.VectorUDT@3bfc3ba7 but was actually org.apache.spark.mllib.linalg.VectorUDT@f71b0bce.'
Any thoughts how would I do this conversion between vector types.
Thanks a lot.