Should we parallelize a DataFrame like we parallelize a Seq before training
<p>Consider the code given here,</p>

<p><a href="https://spark.apache.org/docs/1.2.0/ml-guide.html" rel="noreferrer">https://spark.apache.org/docs/1.2.0/ml-guide.html</a></p>

<pre><code>import org.apache.spark.ml.classification.LogisticRegression
val training = sparkContext.parallelize(Seq(
  LabeledPoint(1.0, Vectors.dense(0.0, 1.1, 0.1)),
  LabeledPoint(0.0, Vectors.dense(2.0, 1.0, -1.0)),
  LabeledPoint(0.0, Vectors.dense(2.0, 1.3, 1.0)),
  LabeledPoint(1.0, Vectors.dense(0.0, 1.2, -0.5))))

val lr = new LogisticRegression()
lr.setMaxIter(10).setRegParam(0.01)

val model1 = lr.fit(training)
</code></pre>

<p>Assuming we read "training" as a dataframe using sqlContext.read(), should
we still do something like </p>

<pre><code>val model1 = lr.fit(sparkContext.parallelize(training)) // or some variation of this
</code></pre>

<p>or the fit function will automatically take care of parallelizing the computation/ data when passed a dataFrame</p>

<p>Regards,</p>