Hi Arunkumar,

There are two implementation for LinearRegression, one
<https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala>
under ml package and another one
<https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/regression/LinearRegression.scala>
under mllib package.
We can ensure the LinearRegression
<https://github.com/apache/spark/tree/master/mllib/src/main/scala/org/apache/spark/ml/regression>
under ml package can produce the same result compared with R, so please use
this one to test. If you still get different result, please file a JIRA to
track it.

Yanbo


2015-12-16 14:35 GMT+08:00 Arunkumar Pillai <arunkumar1...@gmail.com>:

> Hi
>
> The Regression algorithm in the MLlib is using Loss function to calculate
> the regression estimates and R is using matrix method to calculate the
> estimates.
>
> I see some difference between the results of Both Spark and R.
>
> I was using the following class
> LinearRegressionWithSGD.train(parsedData, numIterations)
>
> is it possible to get both results same.
>
> Please correct me if i'm wrong
>
>
>
> --
> Thanks and Regards
>         Arun
>

Reply via email to