How to convert from org.apache.spark.mllib.linalg.VectorUDT to ml.linalg.VectorUDT
<p>I am using Spark cluster 2.0 and I would like to convert a vector from <code>org.apache.spark.mllib.linalg.VectorUDT</code> to <code>org.apache.spark.ml.linalg.VectorUDT</code>.</p>

<pre class="lang-py prettyprint-override"><code># Import LinearRegression class
from pyspark.ml.regression import LinearRegression

# Define LinearRegression algorithm
lr = LinearRegression()

modelA = lr.fit(data, {lr.regParam:0.0})
</code></pre>

<p><strong>Error:</strong></p>

<blockquote>
  <p>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.'</p>
</blockquote>

<p>Any thoughts how would I do this conversion between vector types.</p>

<p>Thanks a lot.</p>